Thursday, January 28, 2016

Check Box Option Enable/Disable On Request form.



 

NAV 2009 R2



 Step1:
Select 1st check box and go to property 
Provide the name for your check box like CB1, CB2, and CB3.


 

Step2:
Now go to cal code of 1st checkbox and write this code on ONVALIDATE Trigger.


FOR CB1


IF YMD THEN //YMD is sourceexpr of CB1
BEGIN
  RequestOptionsForm.CB2.ENABLED(FALSE);
  RequestOptionsForm.CB3.ENABLED(FALSE);
END ELSE
BEGIN
  RequestOptionsForm.CB2.ENABLED(TRUE);
  RequestOptionsForm.CB3.ENABLED(TRUE);
END;

For CB2
IF MDY THEN
BEGIN
  RequestOptionsForm.CB1.ENABLED(FALSE);
  RequestOptionsForm.CB3.ENABLED(FALSE);
END ELSE
BEGIN
  RequestOptionsForm.CB1.ENABLED(TRUE);
  RequestOptionsForm.CB3.ENABLED(TRUE);
END;


STEP 3:
Write code for the rest 1 check boxes. And it will work.
OUTPUT  
 

My client wants this functionality for data port.
May be it will helpful to others :)