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? 

  • Potential culprit in the CoItems IDO is method SumCoSp

  • Rees,

    I'll search for information on that. Are you saying that we may be missing SumCoSp from our SLCoitems or that I need to make a separate call after I insert the lines to that SumCoSp method?

Reply Children
  • SumCoSp is a standard method.  I very much hope it isn't missing in your environment.

    If Leon is correct and I suspect he may be, you'll need to Invoke this method and then make an Update call to SLCos.  It's the sort of logic I would hitherto have expected a table trigger to have taken care of, but with Infor intent on eliminating as much SQL code as possible, the function could well have moved into the form logic.

    The method takes the CoNum as the only input parameter and returns Price along with Infobar as Output parameters.  The Price property in SLCos is a bound property.

    Best of luck