Sage X3 REST WEB Service Company representation - EDIT

SUGGESTED

Hi

Im using V11 patch 5.

I did a test with the standard representations of Company that comes with the folders, i can read details facet successfully.

When i do a PUT request (using Postman) to edit a record on the COMPANY table i get this error:

 <html>
<body>
<p>Saving has failed</p>
</body>
</html>

The request is:

lOCALHOST:8124/.../COMPANY('00001')

The record im editing is company '00001'

All the information i entered came from the GET i did for this record. i know the uuid are right.

The mandatory fields are there... i dont get an error of missing fields, and data seems ok.

i did severall testing, i removed the child addreses colection, and i removed the STRPER field but i get the same error.  Any suggestions how to edit

Body:

{
"$uuid": "428df318-cbda-4c48-80f4-cc01f3959ade",
"CPY": "00001",
"CPYLEGFLG": true,
"CPYLOG": "",
"CPYNAM": "TRAX3ION Compay",
"CPYSHO": "TRAX3ION",
"CRN": "",
"CRY": "GB",
"DIVCOD": "",
"EECNUM": "",
"KACT": "",
"LEG": "BRI",
"LOGO": null,
"MAIFCY": "",
"NAF": "",
"NID": "",
"NUMADD": 0,
"RGCAMT": 0,
"RGCCUR": "EUR",
"STAFED": "",
"STRPER": "2018-01-01",

"CPYBPA": [
{
"$uuid": "d57caaa0-2cdf-4349-8d3c-f650a88996ce",
"BPAADD": "M01",
"BPAADDFLG": true,
"BPAADDLIG1": "",
"BPAADDLIG2": "",
"BPAADDLIG3": "",
"BPADES": "",
"BPANUM": "00001",
"BPATYP": 2,
"CPY_BPA_CRY": "GB",
"CTY": "",
"EXTNUM": "",
"FCYWEB": "",
"POSCOD": "",
"SAT": ""
}
]

}

Parents
  • 0
    SUGGESTED

    Hello,

    As you have seen in the online help for Web service integration, until all the classic functions are gradually upgraded to the new Style coding, the REST web services may not fully function.




    Having Said that, I tried a test on V11 P7.

    As you have seen in the online help for ws-update we have below.

    So on my test , let's say I just wanted to change the company name in my input I only had below, and it seems to work.

    Hope this helps,

    Regards,

  • 0 in reply to Esfahani

    Esfahani, many thanks, for this i created a zcompany class and representation.

    when i try touse the same Body, just uuid e cynam, i get this error:

    <p>Mandatory field</p>
    <p>Sites created for this legal company</p>
    <p>Mandatory field</p>

    It can be just a patch level thing...

    Another thing, when i try to use the create facet also using the standard company representation i always get this error, i also get it on my zcompany representation:

    lOCALHOST:8124/.../ZCOMPANY

       <p>Wrong syntax for the query. Invalid facet: $create</p>

    Many thanks in advance!

  • 0 in reply to Luis Moreira

    I have read your articles before and the tests with a specific table worked fine. Im trying to use the standard reresentations for existing tables as much as possible. but im struggling with creating records for company and sites (facility).

  • 0 in reply to Luis Moreira

    Hello,

    I did get the same message, but my description was updated.

    Regards,

Reply Children