ALAppExtensions
ALAppExtensions copied to clipboard
[Event Change Request] CalcItemPlanPlanWksh.Codeunit.al - OnCodeOnBeforeInvtProfileOffsettingSetParm
Can you please do some changes to the OnCodeOnBeforeInvtProfileOffsettingSetParm event in CalcItemPlanPlanWksh.Codeunit.al? Also please pass Item by reference instead of value in the Event.
if PlannedProdOrderLine.Find('-') then
repeat
if ProdOrder.Get(PlannedProdOrderLine.Status, PlannedProdOrderLine."Prod. Order No.") then begin
if (ProdOrder."Source Type" = ProdOrder."Source Type"::Item) and
(ProdOrder."Source No." = PlannedProdOrderLine."Item No.")
then
ProdOrder.Delete(true);
end else
PlannedProdOrderLine.Delete(true);
until PlannedProdOrderLine.Next() = 0;
Commit();
//>>>>>>>>>>
IsHandled := false;
OnCodeOnBeforeInvtProfileOffsettingSetParm(Item, CurrTemplateName, CurrWorksheetName, ToDate, FromDate, UseForecast, ExcludeForecastBefore, MfgSetup, MRP, RespectPlanningParm, TempPlanningCompList, IsHandled);
if not IsHandled then begin
InvtProfileOffsetting.SetParm(UseForecast, ExcludeForecastBefore, CurrWorksheetType::Planning);
InvtProfileOffsetting.CalculatePlanFromWorksheet(
Item, MfgSetup, CurrTemplateName, CurrWorksheetName, FromDate, ToDate, MRP, RespectPlanningParm);
// Retrieve list of Planning Components handled:
InvtProfileOffsetting.GetPlanningCompList(TempPlanningCompList);
end;
//<<<<<<<<<<
CopyFilter("Variant Filter", PlanningAssignment."Variant Code");
CopyFilter("Location Filter", PlanningAssignment."Location Code");
[IntegrationEvent(false, false)]
local procedure OnCodeOnBeforeInvtProfileOffsettingSetParm(var Item: Record Item; CurrTemplateName: Code[10]; CurrWorksheetName: Code[10]; ToDate: Date; FromDate: Date; UseForecast: Code[10]; ExcludeForecastBefore: Date; MfgSetup: Record "Manufacturing Setup"; MRP: Boolean; RespectPlanningParm: Boolean; var TempPlanningCompList: Record "Planning Component" temporary; var IsHandled: Boolean)
begin
end;
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.