How to Disable any Control based on condition

mkpjsr
Member Posts: 587
Hi all,
I want to disable/enable a button control on a form based on some condition.
can anybody guide me, how to do this.
I want to disable/enable a button control on a form based on some condition.
can anybody guide me, how to do this.
0
Comments
-
1) you need to give a name to the button (see name property of the button)
2) To enable/disable it : currForm.TheButton.ENABLED(Some condition);
BTW : IF you want to use it on a textbox, you better use EDITABLE(some condition)Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
write the code on after record in form level.
take this scenerio for example if the structure is there in the purchase order then Visible otherwise not.
IF "structure " <> ' ' THEN
CurrForm.Structure.VISIBLE(FALSE)
ELSE
CurrForm.Structure.VISIBLE(TRUE)0 -
It is more readable/compact to write:
CurrForm.Structure.VISIBLE("structure" = ' ')
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
It's also more user friendly to leave the button enabled and throw an error if everything is not correct. A disabled button just leaves the user wondering how to enable it with no clues.0
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