Hello all,
I've created an app for our employees and the app needs to be able to POST to the Item Journal Line table. I'm working with this walkthrough https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-develop-custom-api (I adapted the table in the walkthrough to the Item Journal Line) which has gotten me 90% there. I can GET from the API perfectly. But I keep getting an error when trying to POST and I can't figure out why.
Here is the code for the API page: https://paste.mod.gg/koccooxpvubw/0
POST body:
{ "journalTemplateName": "OUTPUT", "lineNo": "10000", "itemNo": "PN00019", "postingDate": "2022-06-15", "entryType": "Output", "documentNo": "RMS 22-000609", "operationNo": "03010", "outputQuantity": "1" }
I am confident that what I've put in the body here is valid. It has all of the fields that I included in the API page, named correctly, and the values are valid values. I am wondering, does every field in the 'Item Journal Line' table need to be in the API page for it to allow you to POST? There are a lot of fields in the Item Journal Line table, so I don't want to start trying to add them all to the API page extension/POST body if it is not the issue.
Thank you for your help!