I am trying to write a Job Queue codeunit that will at an interval try to post sales shipment from Sales Order. I have looked into
I am trying to write a Job Queue codeunit that will at an interval try to post sales shipment from Sales Order. I have looked into
This worked. Thanks.
Hi
I would suggest creating a new codenit, filter sales orders, and make Ship boolean as true in the sales header. Then call the Codeunit 80 (Sales-Post)
You can use the newly created codeunit to run your job queue.
Regards
Avinash B
Try this.
SalesHeader: Record "Sales Header";
SalesPost: Codeunit "Sales-Post";
case SalesHeader."Document Type" of
SalesHeader."Document Type"::Order:
SalesHeader.Ship := true;
SalesHeader."Document Type"::"Return Order":
SalesHeader.Receive := true;
end;
SalesHeader.Invoice := false;
Clear(SalesPost);
SalesPost.Run(SalesHeader);
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156