Modifying Sales Order Line items via SDK


This article provides a workaround for customers looking to modify, add or re-order Sales Order line items through the Everest SDK (Software Development Kit). 



To further enhance the power of Everest, Everest Software provides an Everest Software Development Kit (SDK) to supports the development of custom-fit, practical solutions without requiring in-depth knowledge of Everest’s architecture.

The SDK does not provide a direct way to insert and re-order Sales Order line items but this can be done through customizing the relevant Sales Order XML file.

Note: The steps below should be done by a user with Super User privileges and assume that the customer environment already has the Everest API installed.

This requirement can be achieved by adding and modifying the sequence of the Sales Order items as shown in the following example:

  1. The initial state of the Sales Order is as shown in the attached screenshot and we would need to add a new item on line 2. 

  2. First, we add the item, using the eoSalesDocument.addLineItem, using the XML given below.
    <?xml version='1.0' encoding='utf-8' ?>
    <Description>1994 Pessac-Leognan Blanc</Description>
  3. Using eoSalesDocument.Retrieve, we retrieve the line items
  4. Take all elements under <LineItems> from the retrieved line items and remove all fields that contain "ReadOnly" attributes
  5. Since the sample is using the tax calculation method as automatic, we need to remove the <TaxCode> entry. See Adding_line_item.xml 
  6. Modify the value in the field Sequence to move the last entry, newly added line item on step 2, to the intended position, and update the sequence field afterward as the next sequence. See Updating_the_sequence.xml 
  7. Using the modified XML, call eoSalesDocument.ModifyLineItems. This new line item should be added in the desired position as configured:

Refer to Working with the Everest API for more information on working with the Everest SDK and API.

​Back to top




Please sign in to leave a comment.