I want to make a boolean field available to a subset of users to allow them to control access to a form. At the moment my cod is the following:
Form - OnAfterGetRecord()
IF xBool = TRUE THEN BEGIN
CurrForm.EDITABLE(FALSE);
//TestUser;
//CurrForm.xBool.EDITABLE(TRUE);
END;
IF xBool = FALSE THEN
CurrForm.EDITABLE(TRUE);
The problem occurs when a user blocks the form. Now I can't unblock the form. I need to make this booelan field editable - I tried putting the commented code above to solve this problem but nothing happens. Once I block the form, it can't be unblocked.
Any suggestions?
Answers
If you have an extra codeunit/report with you, then write a new function, pass the record variable as a parameter to this function Modify the boolean filed to true and exit. Now allow permission to only few users who will be able to execute the report/codeunit.
Hope this works for you.
For any queries you can also visit my blog site: http://msnavarena.blogspot.com/
and....
and...
In addition to my earlier code in the Form - OnAfterGetRecord() trigger this works a treat!
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.