Disable a field based on user name
yonhantdaenta89@hotmail.com
Member Posts: 52
Hi All,
how can we disable a field of a page from the C/AL Code ?
I need to disable a field that based on user
thanks ,
how can we disable a field of a page from the C/AL Code ?
I need to disable a field that based on user
thanks ,
0
Best Answer
-
Hi,
What mohana meant with third line is -
1. In Page designer select the row where field is placed.
2. Navigate to its properties shortcut SHift + F4.
3. In Properties you will see editable / visible / enable. whatever you want to set based on user specify that boolean on that particular property value.
Hope it make sense.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page1
Answers
-
Create a global Boolean variable with property Include in dataset
write the code in OnOpenpage trigger or onvalidate trigger depending upon your requirement to make the above variable true/false.
add the Boolean variable in field property visible/editable etc1 -
Hi Mohana,
i am quite confuse with your third line ?
can you elaborate ?
thanks,
0 -
Hi,
What mohana meant with third line is -
1. In Page designer select the row where field is placed.
2. Navigate to its properties shortcut SHift + F4.
3. In Properties you will see editable / visible / enable. whatever you want to set based on user specify that boolean on that particular property value.
Hope it make sense.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page1 -
@mohana_cse06 : thanks,
0 -
I think the best way to do this is creating new boolean field in User Setup table. Maybe the same setup after time you will need to have for other users. Then you will need to write a code ... That is not recommended.
When you will have the bool field (Show Fields on MYPAGE), in the page you will write
variableusedindataset := FALSE;
RecUserSetup.GET(USERID);
IF RecUserSetup."Show Fields" THEN
variableusedindataset := TRUE;
in Editable property you will write variableusedindataset.
When you will need to allow other user edit that field, you will just check it in User Setup table for that user.
Best Regards0 -
use the AccessByPermission property on the field.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K 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
- 324 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



