How to know table and record for a "Record link" from SQL ?

Goyo
Member Posts: 36
Hi everyone. I'm writing an application in .Net and selecting data from a SQL Nav 2009 database.
I'm trying to show the URL1 field from the table "Record Link" associated to a record from a table, but I don't know how to access to the correct "Record Link" record. When I open the Links in Navision I can see the column "Record ID" wich contains the Table and Key values, but in SQL the content for this column is some weird number.
I've been looking in mibuso for help but I haven't found how to make an SQL with this purpose.
Anyone knows the solution.
Thanks.
I'm trying to show the URL1 field from the table "Record Link" associated to a record from a table, but I don't know how to access to the correct "Record Link" record. When I open the Links in Navision I can see the column "Record ID" wich contains the Table and Key values, but in SQL the content for this column is some weird number.
I've been looking in mibuso for help but I haven't found how to make an SQL with this purpose.
Anyone knows the solution.
Thanks.
0
Answers
-
There isn't an easy one.
I also had the problem and the only solution I found was to create in each record a Record ID that points to itself.
That way, in SQL I can connect the "Record Link"-record to the original record. But you will need to add the "Table ID" of the table to which the record is connect to make it easy to find.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
look at doing what I did - format the description so it can be used to find the correct linkDavid Machanick
http://mibuso.com/blogs/davidmachanick/0 -
Does this help?
http://blogs.msdn.com/b/microsoft_dynam ... erver.aspx0 -
Thank you all for your help, I'll try first the kriki solution, since it seems easier and I have to show only the links for one particular table. I'll let you know how it worked.
Thanks.0 -
Ok, it worked =D>
I've created a field type RecordId and populate it OnInsert. For table "Production Order" it works fine, even when you change its state, the OnInsert is triggered again and it keeps working.
Thank you so much.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
- 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