calling all nav gurus
Suppose there are 2 fields on a card 1.Category 2.Inventory , "Category" has two values A or B ,Inventory is a flowfield which drills down to show ledger entries.I want the drill down to work only when the Category =A and not when Category=B
Regards,
GD
0
Comments
IF "Category"='B' THEN CurrForm.Inventory.ENABLED:=FALSE ELSE CurrForm.Inventory.ENABLED:=TRUE;
GD
What happens if the user changes the Category. You will need to put code in the onvalidate trigger. BBrown solution is far better.
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
This works fine but this Restriction is only for the "End Users" but the "Managers" want to see the Item Ledger Entries for all Item Categories i.e this restriction should not apply to them.
I started with
1.Creating a user called MISCUSER in SQL SERVER 2005 and then Synchronized the Users from NAV CLIENT.
2.Created a new ROLE called MISC ROLE and copied all the permissions from the "SUPER" Role except for the Table "Item" where i first tried to make the Permission as "Blank" and then "Indirect".
3.Wrote the Following code
sample 2.
4. I was expecting for the MISCUSER login when i run the item card it should show me MESSAGE('You have no read permission to item.');
but it shows
MESSAGE('You have some read permissions to item.')
5.So i tried to Syncronize ALL Logins i get an error "229,"42000",[Microsoft][ODBC SQL Server Driver][SQL Server] Select permission denied on object '$ndo$usrproperty',databse 'demo',schema 'dbo'"
6.Iam trying to accomplish this scenario
when Manager logs in he can see the item card and he can change the item category code and drill down on inventory
but the "end users" down should be restricted as shown in code sample 1 above
Any help much appreciated ,thanks!
GD
GD
What security filter did you set?
Which record are you using for readpermission?
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
This is the first time iam implementing NAV security thru code. My understanding of NAV security is very poor so please help me out experts!
thanks
GD