dynamics-al

How to test the value of an option field in AL (Dynamics) Business Central


I'm new to AL (Business Central). I want to be able to test the value of an option field.

if myOptionField::Booking then 
begin
  Message('Booking');
end;

But it didn't work.


Solution

  • I recomend you to try this way.

    if rec.myOptionField = myOptionField:: Booking then
    begin
      Message('Booking');
    end;