Hello guys,
Hope you all are doing good
I have some issues in posting the sales order as shipped(not invoiced) using power automate. I have used the codeunit Ship-Post(Yes/No).
I have called the action from Power automate and it runs fine but the order doesn't get posted in Business Central.
The below is my code to post the order
procedure postAsShip(var actionContext: WebServiceActionContext) begin Codeunit.Run(Codeunit::"Ship-Post (Yes/No)"); actionContext.SetObjectId(Page::"Sales Order"); actionContext.SetObjectType(ObjectType::Page); actionContext.AddEntityKey(Rec.FieldNo(SystemId), Rec.SystemId); actionContext.SetResultCode(WebServiceActionResultCode::Updated); end;
Is there any other way to post the sales order as shipped using codeunit.
Any help or suggestions on this would be much appreciated.