codeunit 8063 "Sales Documents" procedure CreateServiceObjectFromSales
Why do you need this change?
We need more flexibility in the CreateServiceObjectFromSales procedure in order to handle when is service object created.
Describe the request
Can you please considere extending it like below:
[IntegrationEvent(false, false)]
local procedure OnBeforeCreateServiceObjectFromSales(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line"; var CanCreateServiceObject: Boolean)
begin
end;
procedure CreateServiceObjectFromSales(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var SalesShptLine: Record "Sales Shipment Line")
var
TempTrackingSpecBuffer: Record "Tracking Specification" temporary;
ItemTrackingDocMgt: Codeunit "Item Tracking Doc. Management";
CanCreateServiceObject: Boolean;
begin
//The function creates Subscription for Sales Line with Subscription Lines
CanCreateServiceObject := SalesServiceCommMgmt.IsSalesLineWithSalesServiceCommitmentsToShip(SalesLine, SalesShptLine.Quantity);
OnBeforeCreateServiceObjectFromSales(SalesHeader, SalesLine, SalesShptLine, CanCreateServiceObject);
if CanCreateServiceObject then begin
ItemTrackingDocMgt.RetrieveDocumentItemTracking(TempTrackingSpecBuffer, SalesShptLine."Document No.", Database::"Sales Shipment Header", 0);
TempTrackingSpecBuffer.SetRange("Source Ref. No.", SalesShptLine."Line No.");
if not TempTrackingSpecBuffer.IsEmpty() then
CreateServiceObjectFromTrackingSpecification(SalesHeader, SalesLine, TempTrackingSpecBuffer)
else
CreateServiceObjectFromSalesLine(SalesHeader, SalesLine);
end;
end;
Internal work item: AB#598047
The subscription billing app is now part of the BCApps repository. Shouldn't event requests be created at the the BCApps repository now? @JesperSchulz
The subscription billing app is now part of the BCApps repository. Shouldn't event requests be created at the the BCApps repository now? @JesperSchulz
Indeed! I will transfer this issue. Also, with the code being on BCApps, partners should implement the code themselves through a pull request.
@samra-singhammer, could you create pull request here on BCApps which addresses your request?
@JesperSchulz Yes. Thanks you.
@samra-singhammer, what's the status on this one?
@JesperSchulz @samra-singhammer @AndersLarsenMicrosoft @miljance Should we close this case?
@samra-singhammer This function has been obsoleted. In best case the new approach has to be proposed. Until then I guess you do not need this Event any longer? Can this Issue be closed?
closed