I have a question in regards to creating a transaction entity using the eConnect API. I am trying to accomplish two things in one Transaction Scope:
1.) Create Item
2.) After the item is created, Create the Price Level(s) for the item
within my TransactionScope are two CreateTransactionEntity calls which use different XmlDocuments.
Creating the item XML:
<?xml version="1.0" encoding="UTF-8"?>
<eConnect xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance">
<IVItemMasterType>
<eConnectProcessInfo xsi:nil="true" />
<taRequesterTrxDisabler_Items xsi:nil="true" />
<taUpdateCreateItemRcd>
<ITEMNMBR>abctest2-testing2</ITEMNMBR>
<ITEMDESC>abc test item2</ITEMDESC>
<ITMCLSCD>main</ITMCLSCD>
<UOMSCHDL>EACH</UOMSCHDL>
<UpdateIfExists>0</UpdateIfExists>
</taUpdateCreateItemRcd>
<taUpdateCreateItemCurrencyRcd_Items xsi:nil="true" />
<taIVCreateItemPriceListLine_Items xsi:nil="true" />
<taIVCreateItemPriceListHeader xsi:nil="true" />
<taItemSite_Items xsi:nil="true" />
<taCreateItemVendors_Items xsi:nil="true" />
<taCreateKitItemRcd_Items xsi:nil="true" />
<taCreateInternetAddresses_Items xsi:nil="true" />
</IVItemMasterType>
</eConnect>
Creating Price Level XML:
<?xml version="1.0" encoding="UTF-8"?>
<eConnect xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance">
<IVCreateItemPriceListType>
<eConnectProcessInfo xsi:nil="true" />
<taRequesterTrxDisabler_Items xsi:nil="true" />
<taIVCreateItemPriceListLine_Items>
<taIVCreateItemPriceListLine>
<ITEMNMBR>abctest2-testing2</ITEMNMBR>
<CURNCYID>Z-US$</CURNCYID>
<PRCLEVEL>retail</PRCLEVEL>
<UOFM>EACH</UOFM>
</taIVCreateItemPriceListLine>
</taIVCreateItemPriceListLine_Items>
<taIVCreateItemPriceListHeader>
<ITEMNMBR>abctest2-testing2</ITEMNMBR>
<UOFM>EACH</UOFM>
<PRCLEVEL>retail</PRCLEVEL>
<CURNCYID>Z-US$</CURNCYID>
</taIVCreateItemPriceListHeader>
</IVCreateItemPriceListType>
</eConnect>
After this happens, I get Error Number = 7098 Stored Procedure= taUpdateCreateItemRcd Error Description = Item number already exists and the updateifexists flag is set to not allow updates. Even after receiving this error, both the item and price levels are still successfully created. Any idea why I'm getting this error? The error also contains the XML for the item creation (taUpdateCreateItemRcd) which is coming from the price level creation call.
*This post is locked for comments
I have the same question (0)