check option value

hi I’m using following code, this will give an error saying “type conversion is not possible option=text”

IF status = ‘canceled’ THEN BEGIN
ERROR(‘Status is not canceled’);

here status is an option type filed in my table. how can i check option values.

assuming cancelled is one of the option

IF status = status::canceled THEN BEGIN
ERROR(‘Status is not canceled’);

I recommend you get yoursef trained on NAV basic technical stuff before playing with the code.

Thank you for your help.

You mentioned “I recommend you get yourself trained on basic technical stuff before playing with the code.”

Can you please tell me good reference to have a look.

There is a nice book “Programming Microsoft Dynamics NAV” from David Studebaker ISBN: 9781904811749

I really recommend this book for learning NAV programming.

And there’s actually also a new one on the way for version 2009.

Hi All,

Thank you very much for your advice. I’ll go through the book that you recommended.

Thanks.

There are also free options, assuming you’re a partner on a service plan or a customer paying the enhancement fee. Check out partnersource and customersource. And the Application Designer’s Guide on the product CD.