using onValidate() on a flowfield?

Boom-BoxBoom-Box Member Posts: 27
edited 2007-12-11 in Navision Attain
hi masters :)

i am experiencing this problem:

i have a table with a foregn key (Customer ID) and a flow field (customer name). customer name is being refreshed by calcfields in cusotmerID 'onValidate()'.

now, i am developing a code unit which needs to validate if that field (customer name) is not empty. since it's a flow field, i was trying to use the field.VALIDATE function, but i need to have some code in the OnValidate trigger in the customer name field...but what? EXISTS? i'm not being successful.

it's quite a big question, but i'm guessing the answer must be easy, though i'm quite swimming among c/al functions...

thank you in advance,

mike

Comments

  • gulamdastagirgulamdastagir Member Posts: 411
    customername:=rec.CALCFIELD("Customer id");
    if Customername='' then
    Message('Customer Name does not exist')
    else
    Message('Customer Name is %1',customername);
    Regards,

    GD
Sign In or Register to comment.