Purchase Header GetPstdDocLinesToReverse
Describe the request
Hello it will be usefull to have into the GetPstdDocLinesToReverse function on purchase header, same events as the sales header function with the same name
Purchase:
procedure GetPstdDocLinesToReverse() var PurchPostedDocLines: Page "Posted Purchase Document Lines"; begin GetVend("Buy-from Vendor No."); PurchPostedDocLines.SetToPurchHeader(Rec); PurchPostedDocLines.SetRecord(Vend); PurchPostedDocLines.LookupMode := true; if PurchPostedDocLines.RunModal() = ACTION::LookupOK then PurchPostedDocLines.CopyLineToDoc();
Clear(PurchPostedDocLines);
end;
Sales: procedure GetPstdDocLinesToReverse() var SalesPostedDocLines: Page "Posted Sales Document Lines"; IsHandled: Boolean; begin IsHandled := false; OnBeforeGetPstdDocLinesToReverse(Rec, IsHandled); if IsHandled then exit;
GetCust("Sell-to Customer No.");
SalesPostedDocLines.SetToSalesHeader(Rec);
SalesPostedDocLines.SetRecord(Customer);
SalesPostedDocLines.LookupMode := true;
if SalesPostedDocLines.RunModal() = ACTION::LookupOK then
SalesPostedDocLines.CopyLineToDoc();
Clear(SalesPostedDocLines);
OnAfterGetPstdDocLinesToReverse(Rec);
end;
Additional context
I need to extend the standard function to add custom text lines with the original order reference Internal work item: AB#561283
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 28412.