Friday, May 10, 2019

WS > Add/Update : Credit Memo > Apply List > Populate "Line Element" > Error :Unable to find a matching line for sublist apply with key: [doc,line] and value: [xx,xx]

In the UI if you go to Transactions > Customers > Issue Credit Memo > Select a Credit Memo for a customer with multiple invoices : Edit > Observe under the "Apply" tab > Multiple Invoices are listed in order

The "Line" element under CreditMemo:Apply List does not correspond to line number as how the Invoice appears in the UI. When applying a credit memo via Web Services the "Line" element should not be passed through or populated as "0". If you do a "Get" operation on the credit memo before applying you will notice that Line Element for each Invoice listed under Apply  tab comes back as zero. Please refer to the sample request :

         platformMsgs:record xsi:type="s0:CreditMemo" internalId="1996">
                  s0:apply true /s0:apply
                  s0:doc 849 /s0:doc // internal id of the transaction
                  s0:total -1.0 /s0:total
                  s0:line 0 /s0:line // populate it as either 0 or do not populate it

No comments:

Post a Comment