Hello,
I’m wondering if it’s possible to have a tablerelation on a field that is depending on a choice of an enum.
field(1; Code; Code[20])
{
Caption = 'Code';
DataClassification = ToBeClassified;
}
field(2; "Status Object"; Enum "Status")
{
Caption = 'Status Object';
DataClassification = ToBeClassified;
}
These are the fields in my table. I would like to add a table relation in code that depends on the choice made in the enum (Customer, Item or Vendor).
I was thinking to add a trigger onlookup in de field (2) and adding a procedure who sets a global variable as a text (the chosen enumvalue) and passing the variable as the tablerelation but it doesn,t work.
Thanks for the help