Hi company1,
You have two options to achieve this. You can either add your logic to the OnValidate() trigger of VendorID field on the page level, or you can create a method in your table which gets the vendor name using the vendor ID, here is the code for the method
procedure displayVendorName(): Text
var
vendTable: Record Vendor;
begin
if vendTable.Get(Rec.VendorID) then begin
exit(vendTable.Name);
end;
end;
Then, you use the displayVendorName() method in the page field as follows
field(VendorID; Rec.VendorID)
{
ApplicationArea = All;
}
field(PartcipantName; Rec.displayVendorName())
{
ApplicationArea = All;
}
I hope this helps, let me know if you have any queries.
Regards