Good Morning , I need to implement a strategy NAV 2016 to enable the posting functionnality only after validating if the user belong to a specific group of permission
Event the user click on button post
Then program validate if the user belong to one group
if that the case go to proper table and enable the posting variable and excute the posting action .
My question should use a design pattern such observer to make sure is there interaction between the gui( post button click) or the and the validate function and the table or use a different design pattern ?
if you have any suggestion for the design pattern and how to implement it let me know .
I know that it’s “modern” to talk about Design Patterns, but I’m a little “old fashioned” when it comes to that. And here, while the solution has a “design pattern” to think about, then it also has a UI. And that always goes first.
So in this case, I would actually do something different first. I would either hide or disable the button control, based upon the users permissions. Whenever you can prevent that a user gets an error-message, then do that first. Prevent it form happening.
You should still have a “test” in your posting codeunit to verify this, but then you can do in the same pattern as the standard tests.
i think you have Lean for another options like Actions Like Posting Should Only Visible to Persons Who has Permissions .
Rest Disable It
That would work, if using “standard permissions” and the NST service setting to hide functionality you don’t have in your license or in the user permissions.
i have Seen Your another post
Lets Say in points
- 1st make a Permission set add new Set and Hit Permissions Button
- If All User’s Are Registered in Company So all might be registered in User group or Atleast a User card /User ID
So every One has Profile Id Nothing but Differentiate One With Others Permissions.
So in Every Page introduce a Boolean variable Such That
If ProfileId= Salesorderprocessor then
Boolean := true;
Plz Let Us Know What You Tried So That We can Help you better