ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Table 37 Sales Line - OnAfterFindResUnitCost

Open bleisibach opened this issue 7 years ago • 2 comments

Requesting 1 new event publisher on table 37 Sales Line

Event LOCAL [IntegrationEvent] OnAfterFindResUnitCost(SalesLine : Record "Sales Line";VAR ResCost : Record "Resource Cost")

Code

FindResUnitCost()
ResCost.INIT;
ResCost.Code := "No.";
ResCost."Work Type Code" := "Work Type Code";
CODEUNIT.RUN(CODEUNIT::"Resource-Find Cost",ResCost);

>>> New Code 
OnAfterFindResUnitCost(Rec,ResCost);
<<< New Code End

VALIDATE("Unit Cost (LCY)",ResCost."Unit Cost" * "Qty. per Unit of Measure");

bleisibach avatar Jan 21 '19 08:01 bleisibach

We already have event OnAfterFindResUnitCost(NearestResCost,Res) in codeunit 220. Is it not enough?

AlexanderYakunin avatar Jan 23 '19 15:01 AlexanderYakunin

@AlexanderYakunin Thank you for your feedback. The event in codeunit 220 does not provide the sales line. For our purpose, we need to have the related sales line in the event.

bleisibach avatar Jan 23 '19 15:01 bleisibach