Create customer order in C# using REST service IDOs (SLCos and SLCoitems). SLCos order totals not updating.

I'm trying to create customer orders using REST web service calls to SLCos and SLCoitems IDOs. I can get both populated and return values indicate success. I also see the resulting data for both the header and the lines afterwards. The problem is that the insert of the SLCoitems records didn't update the header total values. The SLCoitems records also didn't get their item descriptions or costs automatically populated by the insert.

Any ideas? Things to try?

Parents
  • This sounds like expected behavior to me, you'll have to do calls to figure out the missing properties and include them before saving, and/or update counts or call the appropriate IDO methods after the save completes.

    Similar experiences have taught me that it is likely that the form is doing extra work that isn't being done in your calls or there is a property missing that prevents a join to the table bound to the properties that are in concern.


    Investigate the corresponding forms (Customer Order Lines or Customer Order Releases) and the IDO definitions. 

    Some questions to ask are:

    On corresponding forms,
    Do those properties get set via form event handlers while a user enters data before the save happens?
    Do the forms have SaveCompleted form event handlers or something similar to update the counts on the corresponding CO once a save completes?
    Double-check the IDO definitions, review the table tab, are you populating all the properties that are necessary to join to the table that has the bound properties you need? 

  • Leon thank you for your answer.

    I certainly hope that is not the expected behavior. If something is missing the REST API ought to respond back that something is missing and REST API ought to also take care of parent updates to the customer order header.

    I've been spoiled by years of work with Netsuite's REST services. They are sometimes pain to work with too, but they at least let you create a complete order (header and lines) in a single call (single transaction) and manages all the business logic of pulling in reference data and handling calculations of totals, etc.

    I'll keep looking Slight smile

Reply
  • Leon thank you for your answer.

    I certainly hope that is not the expected behavior. If something is missing the REST API ought to respond back that something is missing and REST API ought to also take care of parent updates to the customer order header.

    I've been spoiled by years of work with Netsuite's REST services. They are sometimes pain to work with too, but they at least let you create a complete order (header and lines) in a single call (single transaction) and manages all the business logic of pulling in reference data and handling calculations of totals, etc.

    I'll keep looking Slight smile

Children
No Data