ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Page 9211 Resource Alloc Per Job Matrix
Requesting 2 new event publisher on page 9211 Resource Alloc. Per Job Matrix
Event 1 - OnBeforeLoopMatrixRec
Event
LOCAL [IntegrationEvent] OnBeforeLoopMatrixRec(VAR MatrixRec : Record "Job Planning Line";VAR MatrixCellQuantity : Decimal)
Code
LOCAL MatrixOnAfterGetRecord()
MatrixRec.RESET;
MatrixRec.SETRANGE("Job No.","No.");
MatrixRec.SETRANGE(Type,MatrixRec.Type::Resource);
MatrixRec.SETRANGE("Schedule Line",TRUE);
IF GETFILTER("Resource Filter") <> '' THEN
MatrixRec.SETFILTER("No.",GETRANGEMIN("Resource Filter"),GETRANGEMAX("Resource Filter"));
FOR I := 1 TO ARRAYLEN(MatrixColumnDateFilters) DO BEGIN
MatrixCellQuantity := 0;
MatrixRec.SETRANGE("Planning Date",GetStartDate(MatrixColumnDateFilters[I]."Period Start"),
MatrixColumnDateFilters[I]."Period End");
//New Code
OnBeforeLoopMatrixRec(MatrixRec, MatrixCellQuantity);
//New Code End
IF MatrixRec.FIND('-') THEN
REPEAT
MatrixCellQuantity += ROUND(MatrixRec.Quantity * MatrixRec."Qty. per Unit of Measure",0.00001)
Event 2 - OnAfterMatrixOnDrillDown
Event
LOCAL [IntegrationEvent] OnAfterMatrixOnDrillDown(VAR JobPlanningLine : Record "Job Planning Line";VAR IsHandled : Boolean)
Code
LOCAL MatrixOnDrillDown(Column : Integer)
PlanningLine.SETFILTER("No.",GETRANGEMIN("Resource Filter"),GETRANGEMAX("Resource Filter"));
PlanningLine.SETRANGE("Planning Date",GetStartDate(MatrixColumnDateFilters[Column]."Period Start"),
MatrixColumnDateFilters[Column]."Period End");
PlanningLine.SETRANGE("Job No.","No.");
PlanningLine.SETRANGE(Type,PlanningLine.Type::Resource);
PlanningLine.SETRANGE("Schedule Line",TRUE);
//New Code
OnAfterMatrixOnDrillDown(PlanningLine, IsHandled);
IF IsHandled THEN
EXIT;
//New Code End
PAGE.RUNMODAL(PAGE::"Job Planning Lines",PlanningLine);