Announcements
Hi, I hope this question has not been answered before as I have searched and read my eyes dry for information.
I have a page, Pagetype = API, and i want to call the procedure Test which i have given the [ServiceEnabled
attribute.https://api.businesscentral.dynamics.com/v2.0/tenant/Sandbox/api/APIPublisher/APIGroup/APIVersion/companies(GUID)/customers(GUID)/Nav.Test
ActionContext.AddEntityKey(FieldNo(Id), SalesHeader.SystemId); ActionContext.SetResultCode(WebServiceActionResultCode::Deleted);
Thank you!
I resolved it
Apparently the bound action is renamed with initial lowercasing, MyProcedure becomes myProcedure (Look it up with $metadata#).
And the procedure, when called, needs to be prepended with Microsoft.NAV, eg: Microsoft.NAV.myFunction
Also if you want return values, only primitives seems to be allowed and you can't use the standard procedure pattern;
"procedure MyProcedure(var ActionContext: WebServiceActionContext)", as the procedure will not be made available if one gives it a return value.
Hi, I recently added a new Action to Power Automate, hope this will give you some inspiration.
Thanks.
ZHU
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156