RE: Custom field in existing form
Hi, you added the new field to "Company Information" table, but you are trying to get fields from "Sales Invoice Header" table. This obviously can't find your new fields.

There are several ways to deal with this, the following is just one of them, I hope it can help you.




Source code:
tableextension 50100 MyExtension extends "Company Information"
{
fields
{
field(50101; "CIN Number"; Code[20])
{
DataClassification = CustomerContent;
Caption = 'CIN Number';
}
}
}
pageextension 50100 MyExtension extends "Company Information"
{
layout
{
addafter(Name)
{
field("CIN Number"; Rec."CIN Number")
{
ApplicationArea = All;
}
}
}
}
reportextension 50100 MyExtension extends "Standard Sales - Invoice"
{
dataset
{
add(Header)
{
column(CINNumber; CompanyInfo2."CIN Number")
{ }
}
}
var
CompanyInfo2: Record "Company Information";
trigger OnPreReport()
begin
CompanyInfo2.Get();
end;
}
Layout file: [View:/cfs-file/__key/communityserver-discussions-components-files/758/Default-_2800_8_2900_.docx