What I'm sending
{
"journalTemplateName": "ARTICLE",
"journalBatchName": "DEFAUT",
"documentNo":"Test",
"quantity": 500,
"description": "Test",
"entryType": "Purchase",
"unitofMeasureCode": "PCS",
"genProdPostingGroup": "",
"itemNo": "1896-S",
"locationCode": "BLEU",
"ShortcutDimCode1": "VENTES",
"ShortcutDimCode2": "PEUGEOT"
}
What I'm getting : the journalBatchName is incorrect.
{
"amount": 391133.5,
"appliesfromEntry": 0,
"appliestoEntry": 0,
"binCode": "",
"countryRegionCode": "",
"customField1": "",
"customField2": "",
"customField3": "",
"customField4": "",
"customField5": "",
"customField6": "",
"customField7": "",
"customField8": "",
"description": "Test",
"discountAmount": 0,
"documentDate": "0001-01-01",
"documentNo": "TEST",
"entryType": "Purchase",
"externalDocumentNo": "",
"genBusPostingGroup": "",
"genProdPostingGroup": "",
"id": "id",
"indirectCost": 0,
"ItemDescription": "",
"itemNo": "1896-S",
"journalBatchName": "TEST",
"journalTemplateName": "ARTICLE",
"lastModifiedDateTime": "2023-11-02T14:00:08.65Z",
"lineNo": 30000,
"locationCode": "BLEU",
"postingDate": "0001-01-01",
"quantity": 500,
"reasonCode": "",
"salespersPurchCode": "",
"ShortcutDimCode1": "VENTES",
"ShortcutDimCode2": "PEUGEOT",
"ShortcutDimCode3": "",
"ShortcutDimCode4": "",
"ShortcutDimCode5": "",
"ShortcutDimCode6": "",
"ShortcutDimCode7": "",
"ShortcutDimCode8": "",
"transactionType": "",
"transportMethod": "",
"unitAmount": 782.267,
"unitCost": 782.267,
"unitofMeasureCode": "PCS"
}
What my API page looks like : Basically I have the API page settings and just the fields mapping. I have added custom fields, as you can see in the JSON body I'm receiving
field(journalBatchName; Rec."Journal Batch Name")
{
ApplicationArea = All;
}