Hi, I'm trying to insert into a sub page of a custom entity using the API functionality that comes with NAV 2018.
I used pages 5475 and 5476 as a reference. When I create Invoice using the following POST request on the sales invoice entity both the sales header and lines get created.
/API/beta/companies({{companyId}})/salesInvoices?$expand=salesInvoiceLines
{
"customerNumber": "50000",
"salesInvoiceLines":
[
{
"sequence": 10000,
"itemId": "f05a162d-35a8-4723-896c-e4eca769bf76"
}
]
}
I created similar custom pages but when I try to do POST request then the parent record get's created but nothing happens in the sub page, no triggers in the sub page will run and nothing get's created.
Pages 5477 and 5479 work also, I then tried to copy those pages to new numbers and post but then I got the same results as with my custom entity, the parent get's created but no activity comes from the sub page. This tells me that rather than something is wrong with my custom entity there is something more that need's to be done for the sub page to work as API entity that can be inserted into.
*This post is locked for comments