Insert through API - OnClosePage trigger?

kefkef Member Posts: 7

I have created an API (BC16.5 version), where I have header and lines in my definition.

After the retrieval of the last line I want to do some processing-code. But how do I trigger this?

On a normal page I would use the OnClosePage()-trigger, but that is not possible on an API Page.
Is there another way?

Just to sum up the scenario:
I receive one header with three lines. After the last line I want to post the header and lines all together.

I hope there is a pretty solution. Otherwise the "ugly" solution would be to add a "lastLine" Boolean-field to the lines, and when this is set to true, I would do the processing code after I handle the line.

Best regards,



  • Options
    irasoelbaksirasoelbaks Member Posts: 119
    Is it an option to use OData Unbound/Bound Action to establish the same result? You could use this for pages of type API too.
  • Options
    kefkef Member Posts: 7
    Hi @irasoelbaks ,

    No, I do not believe that is an option. The header & lines I only got working by using Microsoft BC API. OData did not work correctly with the lines.

Sign In or Register to comment.