-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCod50105.ModLocationCode.al
More file actions
31 lines (30 loc) · 1.44 KB
/
Cod50105.ModLocationCode.al
File metadata and controls
31 lines (30 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
codeunit 50105 ModLocationCode
{
Permissions = tabledata "Dimension Set Entry" = RIMD;
TableNo = "Sales Line";
//DimFix
// trigger OnRun()
// var
// DimensionSetEntry: Record "Dimension Set Entry";
// DimensionValue: Record "Dimension Value";
// begin
// if(Rec."Document Type" = Rec."Document Type"::Order) or (Rec."Document Type" = Rec."Document Type"::Quote) or (Rec."Document Type" = Rec."Document Type"::"Return Order")then begin
// Rec."Shortcut Dimension 1 Code":=Rec."Location Code";
// Rec.Modify();
// DimensionSetEntry.Reset();
// DimensionSetEntry.SetRange("Dimension Set ID", Rec."Dimension Set ID");
// DimensionSetEntry.SetFilter("Dimension Code", 'LOC');
// if DimensionSetEntry.FindFirst()then begin
// DimensionValue.Reset();
// DimensionValue.SetFilter("Dimension Code", 'LOC');
// DimensionValue.SetRange(Code, Rec."Location Code");
// if DimensionValue.FindFirst()then begin
// DimensionSetEntry."Dimension Value Code":=Rec."Location Code";
// DimensionSetEntry."Dimension Value Name":=DimensionValue.Name;
// DimensionSetEntry."Dimension Value ID":=DimensionValue."Dimension Value ID";
// DimensionSetEntry.Modify();
// end;
// end;
// end;
// end;
}