Hi All,
I have one Enum type of Field in the vendor card page, and I have one field with lookup of Vendor table in the Fixed Asset card page, I want to filter lookup records in the Fixed Asset page based on selected value on the Vendor card page.
I tried to set table Relation property on the table field, but it is not working for me.
>>On fixed asset card page:
Can anyone help in this?
Thank You.
Good news
Hi
actually your code looks correct to me if your intention is to filter the vendor table for vendors that have vendor type=3
can you insert a screenshot of what you get?
what are the options of the enum of your Vendor Type field which I guess is Custom?
DAniele
Hi,
You can do like as per below, instead of Table Relation, as Table relation required only Primary key field, and you are putting here Name which is not a part of the Primary key field.
field(60151; "Gas Company"; Text[100])
{
DataClassification = ToBeClassified;
trigger OnLookup()
var
Vendor: Record Vendor;
begin
Vendor.SetRange("Vendor type",VendorType::YourOptionhere);
if page.RunModal(page::"Vendor List",Vendor)= Action::LookupOK then
"Gas Company" := Vendor.Name;
end;
}
|
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156