You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you add event after it checks whether a change has been made?
procedure ValidateShortcutDimCode(FieldNumber: Integer; var ShortcutDimCode: Code[20])
var
OldDimSetID: Integer;
begin
OnBeforeValidateShortcutDimCode(Rec, xRec, FieldNumber, ShortcutDimCode);
OldDimSetID := "Dimension Set ID";
DimMgt.ValidateShortcutDimValues(FieldNumber, ShortcutDimCode, "Dimension Set ID");
if "No." <> '' then
Modify();
if OldDimSetID <> "Dimension Set ID" then begin
// >>>>>>>>>>>>>>>>>>
OnValidateShortcutDimCodeOnBeforeUpdateUpdateAllLineDim(Rec, xRec); //Rec as reference
// <<<<<<<<<<<<<<<<<<
if not IsNullGuid(Rec.SystemId) then
Modify();
if PurchLinesExist() then
UpdateAllLineDim("Dimension Set ID", OldDimSetID);
end;
OnAfterValidateShortcutDimCode(Rec, xRec, FieldNumber, ShortcutDimCode);
end;
Additional context
I'm going to update other dimensions when some dimensions had been updated.
To be able to make UpdateAllLineDim work OldDimSetID must be the dimension set id before i change it.
Otherwise only the dimension updated by BC will be updated to the lines.
Internal work item: AB#536970
The text was updated successfully, but these errors were encountered:
Describe the request
Can you add event after it checks whether a change has been made?
Additional context
I'm going to update other dimensions when some dimensions had been updated.
To be able to make UpdateAllLineDim work OldDimSetID must be the dimension set id before i change it.
Otherwise only the dimension updated by BC will be updated to the lines.
Internal work item: AB#536970
The text was updated successfully, but these errors were encountered: