I have been busy playing with custom APIs over last few weekends.
Read about APIs and custom APIs here:-
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:-
So here is the GitHub link:-
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.