Custom API order

I have been busy playing with custom APIs over last few weekends.

Read about APIs and custom APIs here:-

https://www.kauffmann.nl/2020/05/05/deep-insert-with-business-central-apis/.

https://docs.microsoft.com/en-us/learn/modules/work-with-api/

https://community.dynamics.com/business/b/dkatson/posts/how-to-create-custom-apis-for-business-central-even-from-macos

My simple extension has two tables – a header table ‘Web Order Buffer’ and a line table ‘Web Order Line’. As usual, the primary key of header table is ‘No.’ and the line table is ‘Document No.’ and ‘Line No.’. Both header and line tables have guid fields which are ‘ID’ and ‘Document ID’ respectively. ‘Web Order’ and ‘Web Order Line’ page part are linked using these guids.I have written a few lines of code in OnInsertRecord trigger of ‘Web Order Line’ page to support ‘deep insert’. AJ Kauffmann’s blog explains this very well.

We should be able to use systemID, I haven’t tested this though. But I happened to see this nice article:-

http://www.tharangac.com/2020/05/how-to-use-custom-systemid-when.html

So here is the GitHub link:-

https://github.com/manjusree16/AL-Demos/tree/master/CustomAPIorderExample

I have also added call_API.http file that shows how to make GET, POST,PATCH and DELETE calls. For those who are not familiar with it, ‘REST CLIENT’ is an extension that can be used to make API calls from within VSCode. We can use it instead of POSTMAN to test our APIs.

I will try to add a bound action too and update soon.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s