fieldref.OPTIONCAPTION

Capone
Member Posts: 125
Hi!
This problably have a simple solution but for the moment I can't figure out how to do it.
I have read several posts that I can get the caption from an option datatype using a combination of selectstr() and fieldref.Optioncaption.
But how do I get it if I'm not in the scope of the actual record where the field is?
Example:
From the vendor table I want to get the optioncaption from field "Value Posting" in table Default dimension.
I was hoping that could do it something like defaultdim."Value Posting".OPTIONCAPTION but apparently not
This problably have a simple solution but for the moment I can't figure out how to do it.
I have read several posts that I can get the caption from an option datatype using a combination of selectstr() and fieldref.Optioncaption.
But how do I get it if I'm not in the scope of the actual record where the field is?
Example:
From the vendor table I want to get the optioncaption from field "Value Posting" in table Default dimension.
I was hoping that could do it something like defaultdim."Value Posting".OPTIONCAPTION but apparently not

Hello IT, have you tried to turn it off and on?
Have you checked the cables?
Have you released the filters?
http://www.navfreak.com
Have you checked the cables?
Have you released the filters?
http://www.navfreak.com
0
Answers
-
What do you want to do? If you just want to display the value of field "Value Posting" of the Default Dimension of a certain Vendor you neither need FieldRef nor OPTIONCAPTION nor SELECTSTR."Money is likewise the greatest chance and the greatest scourge of mankind."0
-
Sorry, maybe I was a bit unclear....
In table vendor I have this pseudo code:
IF defaultDim."Value Posting" <> defaultDim."Value Posting"::"Code Mandatory" THEN
error("Dimension %1 must have Value Posting = %2",.....);
I want %2 to be the caption to "Value Posting"::"Code Mandatory"Hello IT, have you tried to turn it off and on?
Have you checked the cables?
Have you released the filters?
http://www.navfreak.com0 -
DefaultDim.TESTFIELD("Value Posting",DefaultDim."Value Posting"::"Code Mandatory");
"Money is likewise the greatest chance and the greatest scourge of mankind."0 -
Cheers!Hello IT, have you tried to turn it off and on?
Have you checked the cables?
Have you released the filters?
http://www.navfreak.com0
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