for data filled in fields you can code on the table like
TableRelation = TableName.primarykey;
trigger OnValidate()
var
var: Record TargetTableName;
begin
var.Reset();
var.SetRange(primarykey, Rec."primarykey");
if var.FindFirst() then begin
fieldname := var.ieldname;
.
.
.
end;
end;
but you must specifiy the primary key in table and then you can access the data
and it will fills the fields without editing or entering data.
Hope this helps
thank you