Different OptionString values per different Company

donit
Member Posts: 24
Hello,
I have an option data-type custom field in the Customer table. Would it be possible to have different OptionString values per different Company?
Thanks
I have an option data-type custom field in the Customer table. Would it be possible to have different OptionString values per different Company?
Thanks
0
Comments
-
It is not possible by design. OptionString is part of the object definition, and object definition is per database.
Do not forget that in many cases, each value in option type have some "meaning" which is used in the C/AL code to make decissions, and if you will have different meaning per company, the code will need to know the correct meaning of each value in each company... this will be too much complicated.
Better is to have additional table, where you can define different codes for different companies and you can have the option field in this table to give correct meaning to the code. It will make "mapping" between the user set code and the correct meaning of the option.
(like table with fields "Code, Description, MyOption").0 -
Thank you, Kamil, for your explanation. There is a limit for adding tables this is why I researched this possibility.0
-
Well, Kamils Solution is definitely the better one but this would also be possible:
You could add Options to the field instead of replacing them
Option 0 (for Company A)
Option 1 (for Company
Option 2 (for Company A+B)
Option 3 (for Company C)
Option 4 (for Company A)
...
On Form or Page level create copies of the option control per Company and replace the Option String and Caption in these Controls to show only Options for these companies. Make the controls visible depending on the company in which the user currently works with Code in OnOpenForm, OnOpenPage. In Classic Client easy, in RTC a little more complex.
For Company A the Option String would look like this:
Option 0,,Option 2,,Option 4
For Company B:
,Option 1,Option 2,,
For Company C:
,,,Option 3,Frank Dickschat
FD Consulting0
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