Hi Folks,
I have been stuck with the posting of sales invoice using the power automate by calling the action as a request.
I have tried some AL code to call the default codeunit then expose it as API and use it in Power Automate. Here is the code i tried
procedure postSalesInvoice(var actionContext: WebServiceActionContext)
var
SalesInvoiceRecord: Record "Sales Invoice Header";
begin
Codeunit.Run(Codeunit::"Sales-Post (Yes/No)", SalesInvoiceRecord);
end;
The action is exposed in flow and it results in the below error
Do i need to change anything in the code or any other approach to make it possible?
Any help on this would be appreciated