on 04-12-2024 9:21 AM
I'm attempting to generate a Sales Order draft using the Service Layer API call. The request is a POST made to a service layer URL: https://oursapserver:50000/b1s/v1/Drafts
The JSON data included in the request is as follows:
{
"CardCode": "ABC0001",
"NumAtCard": "ABC00001-1001",
"DocDueDate": "2024-05-01",
"DocDate": "2024-04-12",
"TaxDate": "2024-04-12",
"SalesPersonCode": "16",
"OwnerCode": "137",
"DocObjectCode": "17",
"DocType": "dDocument_Items",
"TrnspCode": 4,
"DocumentLines": [
{
"LineNum": 0,
"ItemCode": "ITM01",
"Quantity": 4,
"Price": 178.44,
"Currency": "PHP",
"VatGroup": "OVAT-V",
"SalesPersonCode": "16",
"OwnerCode": "137",
"DocDate": "2024-04-12",
},
{
"LineNum": 1,
"ItemCode": "ITM02",
"Quantity": 20,
"Price": 250.44,
"Currency": "PHP",
"VatGroup": "OVAT-V",
"SalesPersonCode": "16",
"OwnerCode": "137",
"DocDate": "2024-04-12",
},
{
"LineNum": 2,
"ItemCode": "ITM03",
"Quantity": 15,
"Price": 38.00,
"Currency": "PHP",
"VatGroup": "OVAT-V",
"SalesPersonCode": "16",
"OwnerCode": "137",
"DocDate": "2024-04-12",
}
]
}
The SalesPersonCode and OwnerCode fields correspond to an SlpCode in OSLP and empID in OHEM. It's worth noting that the SalesPersonCode specified in the JSON differs from the SlpCode associated with the CardCode in OCRD.
Upon executing the Service Layer API call, a Sales Order draft is successfully created. However, while the SlpCode is populated with the SalesPersonCode value of 16, the OwnerCode remains NULL.
What adjustments do I need to make to populate the OwnerCode?
I got the OwnerCode to be updated by using the DocumentsOwner key. I checked the Data Transfer Workbench template and saw that this was the key to the OwnerCode column.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
65 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.