I got a field call "Customer Classification." The field has some options common for all companies. But I have to add more choices for specific companies. Is there a way to hide/show options based on company.
The field on the form is It's a TextBox.
Thank you in advance
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
So why do you not change the type of your field to Code and switch to a table relation (don't forgett migrations before and after fieldtypechanging).
Ok, now you must also change your code in the objects where "Customer Classification" is used, but u are more flexible then with your option field.
Regards
If this field is not widely used (or if you can spend all the time doing it )
You can create two forms for the same purpose.
Assuming your field has options: Opt1, Opt2, Opt3, Opt4:
First of all you will have to add all the options since they are common for all companies...
In one form you can go to the appropriate textbox and change the OptionCaption to the following:
Opt1,,,Opt4 (Don't change the default OptionString)
This would hide Opt2 and Opt3 and I think that it works correct with selecting the rest of the options. Then in a Setup table (Maybe Company Information or something similar you could place a boolean field like: "Show advanced options". Based on this you could run the appropriate form (not from a menuItem though :x )...
A last minute thought: place two textboxes on the form based on the same field, but with diferent option captions. Then hide / show the appropriate field based on the setup table... Maybe putting this option on the User Setup table would be better to control the appearance for each user...
You could try something like that and see if it suits your needs. Hope this helps... It's could be the only possible solution I could think of...