conditional drilldown

gulamdastagir
Member Posts: 411
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
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
GD
0
Comments
-
on Form-OnAfterGetCurrRecord()
IF "Category"='B' THEN CurrForm.Inventory.ENABLED:=FALSE ELSE CurrForm.Inventory.ENABLED:=TRUE;Regards,
GD0 -
Write a custom drilldown using the form's OnDrillDown trigger.There are no bugs - only undocumented features.0
-
Hi,
What happens if the user changes the Category. You will need to put code in the onvalidate trigger. BBrown solution is far better.0 -
sample 1.
IF "Item Category Code"<>'MISC' THEN BEGIN ILE.SETFILTER(ILE."Item No.","No."); ILE.SETFILTER(ILE."Global Dimension 1 Code","Global Dimension 1 Filter"); ILE.SETFILTER("Global Dimension 2 Code","Global Dimension 2 Filter"); ILE.SETFILTER("Location Code","Location Filter"); ILE.SETRANGE("Drop Shipment","Drop Shipment Filter"); ILE.SETFILTER("Variant Code","Variant Filter"); ILE.SETFILTER("Lot No.","Lot No. Filter"); ILE.SETFILTER("Serial No.","Serial No. Filter" ); frmILE.SETTABLEVIEW(ILE); frmILE.RUN; END ELSE ;
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.SETPERMISSIONFILTER; If READPERMISSION THEN MESSAGE('You have some read permissions to item.') ELSE MESSAGE('You have no read permission to item.');
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!Regards,
GD0 -
any experts with NAV security? :roll:Regards,
GD0 -
Hi
What security filter did you set?
Which record are you using for readpermission?0 -
I have given a detailed step by step account of what i did.
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!
thanksRegards,
GD0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions