on 08-18-2016 12:42 PM
Here is my impex content to update product code in order entry
INSERT_UPDATE OrderEntry;order(code)[unique=true];entryNumber[unique=true];product(code ,catalogVersion(catalog(id[default=xxcProductCatalog])version[default=Online]))[unique=true];quantity;unit(code);namedDeliveryDate[dateformat=yyyyMMdd];estimatedGrossPrice;estimatedItemTotal;totalPrice;scheduledDate[dateformat=yyyyMMdd];deliveryNote;certificateOfAnalysis;invoices(code);plant(UID); **;A_0001319965;00010;A_000000000000200005;**25000.000;KG;20160817;0.00;0.00;0.00;20160716;;;;A_A020;
i am trying to update the product code "A_000000000000200009" with "A_000000000000200005" , i am getting the following exception
18.08.2016 10:15:28: ERROR: line 2 at main script: line 2: cannot create OrderEntry with values ItemAttributeMap[ registry: null, type: , data: {product=Product 'A_000000000000200009' (8796093415425), unit=Unit 'KG' type 'weight' (8796096462858), totalprice=0.0, order=A_0001319965(8796093251629), estimateditemtotal=0.0, nameddeliverydate=Wed Aug 17 00:00:00 CEST 2016, deliverynote=null, scheduleddate=Sat Jul 16 00:00:00 CEST 2016, certificateofanalysis=null, entrynumber=10, estimatedgrossprice=0.0, plant=A_A020[8796127428613], quantity=25000, invoices=[]} ] due to [de.hybris.platform.servicelayer.interceptor.impl.UniqueAttributesInterceptor@6a041ccc]:ambiguous unique keys {entryNumber=10, order=OrderModel (8796093251629)} for model OrderEntryModel () - found 1 item(s) using the same keys 18.08.2016 10:15:28: ERROR: line 2 at main script: Exception 'line 2: cannot create OrderEntry with values ItemAttributeMap[ registry: null, type: , data: {product=Product 'A_000000000000200009' (8796093415425), unit=Unit 'KG' type 'weight' (8796096462858), totalprice=0.0, order=A_0001319965(8796093251629), estimateditemtotal=0.0, nameddeliverydate=Wed Aug 17 00:00:00 CEST 2016, deliverynote=null, scheduleddate=Sat Jul 16 00:00:00 CEST 2016, certificateofanalysis=null, entrynumber=10, estimatedgrossprice=0.0, plant=A_A020[8796127428613], quantity=25000, invoices=[]} ] due to [de.hybris.platform.servicelayer.interceptor.impl.UniqueAttributesInterceptor@6a041ccc]:ambiguous unique keys {entryNumber=10, order=OrderModel (8796093251629)} for model OrderEntryModel () - found 1 item(s) using the same keys' in handling exception: line 2: cannot create OrderEntry with values ItemAttributeMap[ registry: null, type: , data: {product=Product 'A_000000000000200009' (8796093415425), unit=Unit 'KG' type 'weight' (8796096462858), totalprice=0.0, order=A_0001319965(8796093251629), estimateditemtotal=0.0, nameddeliverydate=Wed Aug 17 00:00:00 CEST 2016, deliverynote=null, scheduleddate=Sat Jul 16 00:00:00 CEST 2016, certificateofanalysis=null, entrynumber=10, estimatedgrossprice=0.0, plant=A_A020[8796127428613], quantity=25000, invoices=[]} ] due to [de.hybris.platform.servicelayer.interceptor.impl.UniqueAttributesInterceptor@6a041ccc]:ambiguous unique keys {entryNumber=10, order=OrderModel (8796093251629)} for model OrderEntryModel () - found 1 item(s) using the same keys
The same update when tried to hMC its working, Can any one suggest how do i update product code if the OrderNumber and EntryNumber are unique for a particular order?
Thanks Sebin
Hi,
You should not define the product as unique.
INSERT_UPDATE OrderEntry;order(code)[unique=true];entryNumber[unique=true];product(code ,catalogVersion(catalog(id[default=xxcProductCatalog])version[default=Online]));quantity;unit(code);namedDeliveryDate[dateformat=yyyyMMdd];estimatedGrossPrice;estimatedItemTotal;totalPrice;scheduledDate[dateformat=yyyyMMdd];deliveryNote;certificateOfAnalysis;invoices(code);plant(UID);
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.