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 Reply Children
  • Yes, it is CSI.

    Url like:

    /IDORequestService/ido/update/SLCoitems?refresh=true

    With content like (only showing one line, but rest look similar):

    {
        "Changes": [
            {
                "ItemID": "PBT=[SLCoitems]",
                "Action": 1,
                "UseOptimisticLocking": true,
                "ItemNumber": -2147483648,
                "XmlItemNumber": null,
                "InsertIfNotFound": false,
                "XmlActionName": "Insert",
                "XmlUseKeysFlag": null,
                "XmlInsertIfNotFound": null,
                "UpdateLocking": 1,
                "XmlUpdateLocking": "Property",
                "Properties": [
                    {
                        "Name": "CoNum",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "H000000013",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "CoLine",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "1",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "SiteRef",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "Default",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "Item",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "JRA-14286",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "UM",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "EA",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "QtyOrdered",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "2",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "DerCurrCode",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "USD",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "DerCurrentDate",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "20240415 09:50:28.943",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "AdrCurrCode",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "USD",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "CoCoCustNum",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": true,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "CoCustNum",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": true,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "CoDisc",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "0",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "CoExchRate",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "1",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "CoOrderDate",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "20240415 00:00:00.000",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "CoType",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "R",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "CurDomPlaces",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "2",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "Price",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "110.00",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "PriceConv",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "110.00",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "RefType",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "P",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "Stat",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "P",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "QtyOrderedConv",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "2",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "Whse",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "EAST",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "CoOrigSite",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "DEFAULT",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    },
                    {
                        "Name": "DueDate",
                        "Modified": true,
                        "Protected": false,
                        "OriginalValue": null,
                        "Value": "20240415 00:00:00.000",
                        "XmlModifiedFlag": null,
                        "XmlProtectedFlag": null,
                        "IsNull": false,
                        "AdditionalAttributeNames": [],
                        "XmlAdditionalAttributes": null
                    }
                ],
                "HasItemNumber": false,
                "SerializationElements": [
                    {
                        "Property": {
                            "@Name": "CoNum",
                            "#text": "H000000013"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "CoLine",
                            "#text": "1"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "SiteRef",
                            "#text": "Default"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "Item",
                            "#text": "JRA-14286"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "UM",
                            "#text": "EA"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "QtyOrdered",
                            "#text": "2"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "DerCurrCode",
                            "#text": "USD"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "DerCurrentDate",
                            "#text": "20240415 09:50:28.943"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "AdrCurrCode",
                            "#text": "USD"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "CoCoCustNum"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "CoCustNum"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "CoDisc",
                            "#text": "0"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "CoExchRate",
                            "#text": "1"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "CoOrderDate",
                            "#text": "20240415 00:00:00.000"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "CoType",
                            "#text": "R"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "CurDomPlaces",
                            "#text": "2"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "Price",
                            "#text": "110.00"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "PriceConv",
                            "#text": "110.00"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "RefType",
                            "#text": "P"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "Stat",
                            "#text": "P"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "QtyOrderedConv",
                            "#text": "2"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "Whse",
                            "#text": "EAST"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "CoOrigSite",
                            "#text": "DEFAULT"
                        }
                    },
                    {
                        "Property": {
                            "@Name": "DueDate",
                            "#text": "20240415 00:00:00.000"
                        }
                    }
                ],
                "NestedUpdates": [],
                "IsSuspendFlagUpdateItem": false
            }
        ]
    }
  • Hmm.... Does the account you are connecting with have Insert/Update permissions for the IDO/Object in question?

  • Yes, both the SLCos and SLCoitems records are getting created and calls return successful status. The order totals are not updated and the line item descriptions and costs are not pulled in.