Hi,
I am trying to update the "Shipping Agent Service Code" and "Shipping Agent Code" fields of a sales order. I created a code unit and exposed it to a web service that i call from an external dashboard. The following code does not error out but also does not update either field. How can I go about doing this?? The web service and code unit both work since i have multiple other procedures that work perfectly fine.
*Note:
id: System id of the sales order
agent: The agent code
procedure EditShippingAgent(id: Text; agent: Text): Text
var
so: Record "Sales Header";
soObj: Codeunit "Sales Orders";
begin
if so.GetBySystemId(id) then begin
// so."Shipping Agent Code" := agent;
so."Shipping Agent Service Code" := agent;
exit(soObj.getHeaderPage(id, ''));
end;
exit('{value:{SO_Not_Found:"true"}}');
end;

Report
All responses (
Answers (