Why do you need this change?
In 4PS Construct we need to extend field 12 "Account Type" in table 11401 "CBG Statement Line" with option 'Fixed asset'.
Describe the request
Dear ALAppExtensions team,
On behalf of 4PS I would like to request next changes:
- Change type of field 12 "Account Type" in table 11401 "CBG Statement Line" from Option to Enum and create new extensible Enum:
//field(12; "Account Type"; Option) //old
field(12; "Account Type"; Enum "CBG Stat. Line Account Type") //new
enum "CBG Stat. Line Account Type"
{
Extensible = true;
value(0; "G/L Account") { Caption = 'G/L Account'; }
value(1; Customer) { Caption = 'Customer'; }
value(2; Vendor) { Caption = 'Vendor'; }
value(3; "Bank Account") { Caption = 'Bank Account'; }
value(4; Employee) { Caption = 'Employee'; }
}
- Add integration event 'OnAfterGetAccountName' to procedure "GetAccountName" in table 11401 "CBG Statement Line":
procedure GetAccountName() Name: Text[100]
var
GLAccount: Record "G/L Account";
Cust: Record Customer;
Vend: Record Vendor;
Employee: Record Employee;
BankAccount: Record "Bank Account";
begin
case "Account Type" of
"Account Type"::"G/L Account":
case false of
GLAccount.Get("Account No."):
Name := Text1000015;
else
Name := GLAccount.Name;
end;
"Account Type"::"Bank Account":
case false of
BankAccount.Get("Account No."):
Name := Text1000015;
else
Name := BankAccount.Name;
end;
"Account Type"::Customer:
case false of
Cust.Get("Account No."):
Name := Text1000015;
else
Name := Cust.Name;
end;
"Account Type"::Vendor:
case false of
Vend.Get("Account No."):
Name := Text1000015;
else
Name := Vend.Name;
end;
"Account Type"::Employee:
case false of
Employee.Get("Account No."):
Name := Text1000015;
else
Name := Employee.FullName();
end;
end;
OnAfterGetAccountName(Rec, Name); //new
end;
[IntegrationEvent(false, false)]
local procedure OnAfterGetAccountName(CBGStatementLine: Record "CBG Statement Line"; var AccountName: Text[100])
begin
//new
end;
- Add integration event 'OnAfterOpenAccountCard' to procedure "OpenAccountCard" in table 11401 "CBG Statement Line":
procedure OpenAccountCard()
var
GLAcc: Record "G/L Account";
Cust: Record Customer;
Vend: Record Vendor;
Employee: Record Employee;
BankAcc: Record "Bank Account";
begin
TestField("Account No.");
case "Account Type" of
"Account Type"::"G/L Account":
begin
GLAcc."No." := "Account No.";
PAGE.Run(PAGE::"G/L Account Card", GLAcc);
end;
"Account Type"::Customer:
begin
Cust."No." := "Account No.";
PAGE.Run(PAGE::"Customer Card", Cust);
end;
"Account Type"::Vendor:
begin
Vend."No." := "Account No.";
PAGE.Run(PAGE::"Vendor Card", Vend);
end;
"Account Type"::Employee:
begin
Employee."No." := "Account No.";
PAGE.Run(PAGE::"Employee Card", Employee);
end;
"Account Type"::"Bank Account":
begin
BankAcc."No." := "Account No.";
PAGE.Run(PAGE::"Bank Account Card", BankAcc);
end;
end;
OnAfterOpenAccountCard(Rec); //new
end;
[IntegrationEvent(false, false)]
local procedure OnAfterOpenAccountCard(CBGStatementLine: Record "CBG Statement Line")
begin
//new
end;
- Add integration event 'OnAfterSetAccountName' to procedure "SetAccountName" in page 11401 "Bank/Giro Journal Subform":
local procedure SetAccountName()
var
[SecurityFiltering(SecurityFilter::Filtered)]
GLAcc: Record "G/L Account";
[SecurityFiltering(SecurityFilter::Filtered)]
Cust: Record Customer;
[SecurityFiltering(SecurityFilter::Filtered)]
Vend: Record Vendor;
[SecurityFiltering(SecurityFilter::Filtered)]
BankAcc: Record "Bank Account";
[SecurityFiltering(SecurityFilter::Filtered)]
Employee: Record Employee;
begin
if (Rec."Account Type" <> xRec."Account Type") or
(Rec."Account No." <> xRec."Account No.")
then begin
AccName := '';
if Rec."Account No." <> '' then
case Rec."Account Type" of
Rec."Account Type"::"G/L Account":
begin
GLAcc.SetLoadFields(Name);
if GLAcc.Get(Rec."Account No.") then
AccName := GLAcc.Name;
end;
Rec."Account Type"::Customer:
begin
Cust.SetLoadFields(Name);
if Cust.Get(Rec."Account No.") then
AccName := Cust.Name;
end;
Rec."Account Type"::Vendor:
begin
Vend.SetLoadFields(Name);
if Vend.Get(Rec."Account No.") then
AccName := Vend.Name;
end;
Rec."Account Type"::"Bank Account":
begin
BankAcc.SetLoadFields(Name);
if BankAcc.Get(Rec."Account No.") then
AccName := BankAcc.Name;
end;
Rec."Account Type"::Employee:
begin
Employee.SetLoadFields("First Name", "Middle Name", "Last Name");
if Employee.Get(Rec."Account No.") then
AccName := Employee.FullName();
end;
end;
end;
OnAfterSetAccountName(Rec, xRec, AccName); //new
end;
[IntegrationEvent(false, false)]
local procedure OnAfterSetAccountName(CBGStatementLine: Record "CBG Statement Line"; xCBGStatementLine: Record "CBG Statement Line"; var AccountName: Text[100])
begin
//new
end;
Why do you need this change?
In 4PS Construct we need to extend field 12 "Account Type" in table 11401 "CBG Statement Line" with option 'Fixed asset'.
Describe the request
Dear ALAppExtensions team,
On behalf of 4PS I would like to request next changes: