Get Source Expression or Field Name with Field Caption in C/AL
 
            
                
                    robertwendler@yahoo.de                
                
                    Member Posts: 27                
            
                        
            
                    Hi guys,
we have developed an addin for list pages. This addins search a specific value in a list. My problem with this is, that the microsoft dynamics nav framework dll does not know which field is focused. The dll only knows the caption of the list. This is a big problem, because if we transfer the caption back to NAV, we are not sure, which field of the page was focused.
My idea: Get the information in C/AL -> read the object blob reference to get the source expression with the control ID or the control caption. Unfortunately the blob reference is decoded.
Has anybody any idea, to get more information with C/AL to page controls? I know, that there is a new virtual table in Dynamics NAV 2018 "Page Control Field". I can solve my problem with this table in Dynamics NAV 2018, because I can transfer the control ID from the addin back to NAV. I am also looking for other solutions, because I need a solution for NAV 2013 to NAV 2018.
I also thought about exporting the object as text file, but this will only work with a developer licence.
Any hint will be appreciated. Thanks.
                we have developed an addin for list pages. This addins search a specific value in a list. My problem with this is, that the microsoft dynamics nav framework dll does not know which field is focused. The dll only knows the caption of the list. This is a big problem, because if we transfer the caption back to NAV, we are not sure, which field of the page was focused.
My idea: Get the information in C/AL -> read the object blob reference to get the source expression with the control ID or the control caption. Unfortunately the blob reference is decoded.
Has anybody any idea, to get more information with C/AL to page controls? I know, that there is a new virtual table in Dynamics NAV 2018 "Page Control Field". I can solve my problem with this table in Dynamics NAV 2018, because I can transfer the control ID from the addin back to NAV. I am also looking for other solutions, because I need a solution for NAV 2013 to NAV 2018.
I also thought about exporting the object as text file, but this will only work with a developer licence.
Any hint will be appreciated. Thanks.
0                
            Best Answer
- 
            Hello,
 Have you tried ObjectMetaData ?ObjectMetadata.GET(OBJECTTYPE::Page, PAGE::"Item List"); ObjectMetadata.CALCFIELDS(Metadata); TempBlob.Blob := ObjectMetadata.Metadata; MESSAGE(TempBlob.ReadAsTextWithCRLFLineSeparator); 5
Answers
- 
            Hello,
 Have you tried ObjectMetaData ?ObjectMetadata.GET(OBJECTTYPE::Page, PAGE::"Item List"); ObjectMetadata.CALCFIELDS(Metadata); TempBlob.Blob := ObjectMetadata.Metadata; MESSAGE(TempBlob.ReadAsTextWithCRLFLineSeparator); 5
- 
            Thank you. I can solve this with this blob field.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
- 322 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
