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

    Hi

    The problem with company representation (the standard one) is that is not checking mandatory fields as in the x3 interface.

    when you try to modify the company name, its ok , but checks others fields for information diferent from the interface, for example the VAT nr. 

    Its impossible to use the BPA structure modifying, and it clears the account core model in the company record.

    About creating a record in company and site , i still get this:

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

    lOCALHOST:8124/.../FACILITY

    i get the same error... 

    Is this related with the body im sending or any other setup on classes or representations?

    many thanks for all the help.

Reply
  • 0 in reply to Esfahani

    Hi

    The problem with company representation (the standard one) is that is not checking mandatory fields as in the x3 interface.

    when you try to modify the company name, its ok , but checks others fields for information diferent from the interface, for example the VAT nr. 

    Its impossible to use the BPA structure modifying, and it clears the account core model in the company record.

    About creating a record in company and site , i still get this:

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

    lOCALHOST:8124/.../FACILITY

    i get the same error... 

    Is this related with the body im sending or any other setup on classes or representations?

    many thanks for all the help.

Children