disable menu button in form..........
nrapendra
Member Posts: 208
hi..
i want to disable post button in purchase order through code.
what code should i write..
regards
i want to disable post button in purchase order through code.
what code should i write..
regards
Nrapendra Singh
(Sr. Tech. Consultant)
Dataman Computer Systems (P) Ltd.
web :www.datamannet.com
mail :nrapendra@datamannet.com
(Sr. Tech. Consultant)
Dataman Computer Systems (P) Ltd.
web :www.datamannet.com
mail :nrapendra@datamannet.com
0
Answers
-
In case you want to disable the menu button itself then you go to the properties of the menu button, enter a specific name, and then in code you can:
CurrForm.MyMenuButton.ENABLED(FALSE);
I don't know any way of disabling just an option of a menu button from code...0 -
To disable the Menu Option "Post" in the Menu Button "Posting", the property Enabled for the Menu Option "Post" can be set to No in design mode.
Dynamically disabling the menu option is not possible. However,dynamically disabling the menu button is possible as shared by arhontis0 -
To disable the Menu Option "Post" in the Menu Button "Posting", the property Enabled for the Menu Option "Post" can be set to No in design mode.
Dynamically disabling the menu option is not possible. However,dynamically disabling the menu button is possible as stated by arhontis0 -
0
-
nrapendra wrote:hi..
i want to disable post button in purchase order through code.
what code should i write..
regards
This is a quite common request, and there are three solutions to it.
1/ Expalin to the client that this is not a good idea, since its not the way Navision works, and instead suggest to them a work around. A common one being to generate an error message that prevents the user from continuing.
This is my prefered solution, and I try very hard to have the customer work with this.
2/ If there is only one Option that needs to be disabled (i.e. your case), then I would create two buttons, identical, buton one button I would disable the Post Invoice option. Then use code to show or hide the appropriate button as required. I have done this a few times, but it has one core issue, and that is that in many cases (where close = 100% of the time ](*,) ) the client will come back and say "brilliant, now can you also make these other 3 options selectable in code, i.e. 16 buttons needed). So if you go this route, tell the customer that in Navisions its absolutely impossible to do more than one option ( :^o a white lie I know but its for their own good), otherwise they will want it on every form.
3/ If the client really does need more than one selectable option. A good example is a clinent that has 10 different versions of a sales order report, and they don't want the user prompted to select from 10, but just the 2 or 3 vaild for that order.
Create a new report. In this report add code that opens a STRMENU dialog, and build the text string using a case based ont he valid selections. Then the user hits the button on the form which opens the option string, and they have dynamic selection as required. (By the way, I do it in a report, because ALLWAYS int he futre, the cleint wants to change it them selves, and a Codeunit would prevent this.David Singleton0 -
Gr8 suggestion David! =D>
How could I forget this? I have already perform such implementation by creating dynamic STRMENU when user login to pick default dimensions or branch, e.t.c.
It is a very cool way and it can be expanded (with more values) without writting too much code or checks...0 -
Arhontis wrote:Gr8 suggestion David! =D>
How could I forget this? I have already perform such implementation by creating dynamic STRMENU when user login to pick default dimensions or branch, e.t.c.
It is a very cool way and it can be expanded (with more values) without writting too much code or checks...
Thanks ... hmm wheres the
smily gone 8) David Singleton0 -
hi..
thanx to all for valuable support.
actualy i have not illustrated the problem due to which i have to modify it.
it is nothing but a simple check on purchase order.
client want that the until posting authority dont write the descriptive
reason for order he will not be able to post it.
not it is solved.
thanx again to all...Nrapendra Singh
(Sr. Tech. Consultant)
Dataman Computer Systems (P) Ltd.
web :www.datamannet.com
mail :nrapendra@datamannet.com0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 327 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

