I want that if user select option 1 do some action and user select option 2 other action to happen how can i achieve this .I tried this code but I am confused.
field(MyOptionField; Option)
{
Caption = 'My Option Field';
OptionValues = OptionValues::Option1..OptionValues::Option3;
trigger OnValidate()
var
MyOption: Option;
begin
MyOption := this.Value;
case MyOption of
OptionValues::Option1:
// Do something if Option 1 is selected
// ...
OptionValues::Option2:
// Do something if Option 2 is selected
// ...
OptionValues::Option3:
// Do something if Option 3 is selected
// ...
end;
end;
}
This is not working.