Item - methods

BulkUDCCreateOrAmend

Driver Type : DJI

Use this method for the bulk loading of item user defined costs data or bulk amendment of item user defined costs data, where performance is critical.

CreateOrAmend

Driver Type : SASI

This method creates an item if it does not exist already and amends it if it does. Whereas the Create and Amend methods depend on you to know whether the data does or does not exist in advance, this method can be used if you are unsure.

Uwaga: Ensure all unit conversions are defined before using the Item component to add Unit Label data. If a conversion is required, but not setup, the import payload will fail.

CreateReplaceOrDelete

Driver Type: SASI

Use this method to synchronize items. The item is created if it does not exist already and replaced if it does. If the item does not exist in the originating business unit, it is deleted.

Delete

Driver Type : SASI

Use this method to delete items.

The default is to delete Item Costs (where possible) when Item deletion is requested. If you do not wish the component to attempt the item costs deletion you must set a parameter accordingly. In TPD/TD the 'Allow Item Costs Deletion' should be unchecked if deletion of child records should not take place. Otherwise, include the following in the payload used to prevent the deletion:

<MethodContext>
  <ItemMethodContext>
    <AllowItemCostsDeletion>N</AllowItemCostsDeletion>  
  </ItemMethodContext>
</MethodContext>
Uwaga: You cannot delete an Item record if child data, such as Costs, exist. When this occurs, use the DeleteChildData method prior to using the Delete method.

DeleteChildData

Driver Type : SASI

This method deletes child data (Item Costs, Assign Conversions, Unit Labels, Alternative Items, Serial Number, Item Characteristics, Storage Characteristics) but retains the parent record (Item).

It is also possible to delete 'grandchild' data. The deletion of child and grandchild data is controlled by a <DeletionFlag> node at child level. If the flag is set to Y, both child and grandchild is deleted. Otherwise, the child data is retained.

For example, the <Characteristics> node contains child data, and the <NumericValues> node contains grandchild data. The <DeletionFlag> node is set to Y, so the <DiscreteValueNumeric> data is deleted first, followed by the <CharacteristicCode> data:

<Item>
  <ItemCode>TEST</ItemCode>
  <Characteristics>
    <DeletionFlag>
      <DeleteCharacteristicAfterDiscreteValue>Y</DeleteCharacteristicAfterDiscreteValue>
    </DeletionFlag>
    <CharacteristicCode>CHILLED</CharacteristicCode>
    <NumericValues>
      <DiscreteValueNumeric>2</DiscreteValueNumeric>
    </NumericValues>
  </Characteristics>
  <Costs>
    <CostAnalysisId>1</CostAnalysisId1>
    <CostTypeCode>MATERIAL</CostTypeCode>
    <CurrencyCode>GBP</CurrencyCode>
    <TransactionCurrency>0</TransactionCurrency>
    <DeletionFlag>
      <DeleteCostAfterUDCostDeletion>Y</DeleteCostAfterUDCostDeletion>
    </DeletionFlag>
    <ItemUserDefinedCost>
      <ItemCostId>REVALUATION</ItemCostId>
    </ItemUserDefinedCost>
  </Costs>
</Item>

Query

Driver Type : Export

Use this method to obtain item details or to extract item data from SunSystems.