As a beginner, I asked copilot to look at my code and suggest an alternative and it gave me this code. I want to add the vendor payment terms code to the AP Aging Report.
Visual studio says that there are many missing brackets on the line of my first "column" statement highlighted in yellow below. I have even tried saving the code as a text file and I tried to create a new page and retyping the code but the error keeps coming up. I have an image of the error attached as well.
reportextension 50105 APAgingExtension extends "Aged Accounts Payable"
{
RDLCLayout = 'AgedAccountsPayable.rdlc';
dataset
{
modify(Vendor)
{
column(Payment_Terms_Code; "Payment Terms Code")
{
// Column to show the payment terms code from Vendor.
}
column(Payment_Terms_Description; PaymentTerms.Description)
{
// Column to show the description from Payment Terms record.
}
trigger OnAfterGetRecord()
begin
PaymentTerms.Get("Payment Terms Code");
end;
}
}
labels
{
PaymentTerm = 'Payment Terms';
PaymentTermDescription = 'Terms Description';
}
var
PaymentTerms: Record "Payment Terms";
}
_______________________________________________________________________________________