I want to create a custom API using AL language, which will accept the below payload/request and then will create a sales order with line items also.
But i tried to do it, not able to achieve this. I have gone through many videos but not get any satisfied answer.
Does anyone have any idea about this, or if you have any code snip please share.
"orderDate": "2024-10-10",
"postingDate": "2024-10-10",
"customerId": "d46301ed-970b-ee11-962f-00224859f0ad",
"currencyCode": "SGD",
"salesperson": "LEROY",
"salesOrderLines": [
{
"itemId": "eb230e11-160c-ee11-962f-00224859f0ad",
"lineType": "Item",
"lineObjectNumber": "10810900019",
"description": "AXE BODY WASH (INDIA) 250ML X 12 AFRICA",
"unitOfMeasureId": "add2b303-200c-ee11-962f-00224859f0ad",
"unitOfMeasureCode": "CTN",
"quantity": 1,
"unitPrice": 17,
"locationId": "4af3149a-6a0c-ee11-962f-00224859f0ad"
}
]
}
Thanks for your Help.