Validate Boolean field

MclarenMclaren Member Posts: 47
Hi All,


I am very much new to NAV. Currently I am getting trained. My exercise is I have to add a boolean field call "edit" in Customer Card Form. If it is got tick then I have allow the user to edit their name on Sales Order Form. otherwise they do not be able to edit.


So far i did is I wrote a trigger on Sales Header Sell to customer name onvalidate trigger like this.


RVCustomer.SETRANGE("No.",RVCustomer."No.");
RVCustomer.SETRANGE(Edit,RVCustomer.Edit);

IF Edit = TRUE THEN
IF RVSalesHeader.FIND ('-') THEN
RVSalesHeader."Sell-to Customer Name".MODIFY(TRUE);

Is this correct?
Any Experts can u provide me a solution.

Answers

Sign In or Register to comment.