Source Table Name

jetins9810
Member Posts: 55
Hi,
How can i get the source table name of a form at run time by coding.
Thanks in advance
How can i get the source table name of a form at run time by coding.
Thanks in advance
With Thanks & Regards
Jetinder Saini...........
CorporateServe Solutions Pvt. Ltd......India
Jetinder Saini...........
CorporateServe Solutions Pvt. Ltd......India
0
Comments
-
-
Thanks for reply
Dear how can i use this can u explain.
Thanks in advanceWith Thanks & Regards
Jetinder Saini...........
CorporateServe Solutions Pvt. Ltd......India0 -
From the online help :TABLENAME (Record)
Use this function to return the name of a C/SIDE table.
Name := Record.TABLENAME
Name
Data type: text or code
The name of the table.
Record
Data type: record
The record in the table for which you want to find the table name.
Comments
The TABLECAPTION function retrieves the Caption property of the table. If you want to enable your application for multilanguage now or in the future, you must use the TABLECAPTION function instead.0 -
Thanks for reply
Dear i want to pick the SourceTable name of a form at run time.
Requirement is that at run time i don't know the name of next form
if i got the form using object table then how can i get the source table
name of this form.
Thanks in advanceWith Thanks & Regards
Jetinder Saini...........
CorporateServe Solutions Pvt. Ltd......India0 -
Hi,
I was affraid you would ask that
It is not possible.
If it is realy nessesairy to know it this way, a possibility is to create a new table where you save the form id and the sourcetable.
You have to fill the data in that table yourself. It might be a few hours work.0 -
Hi Jetins,
You have a form running and want to know the name of the underlying table?
If yes then just press Ctrl-F8 for Zoom and in the headline of the zoom you will find the Tablecaption (Tablename in your language)
I hope that helpsregards,
Michael Schumacher
oh, what day is it? Backup day. OK, let's dump all data to /dev/nul ;-)0 -
Jetins, I got this email:from Jetins9810
requirement is that i am creating a report in which i want the list of forms, there
type and the source table used by these forms. Form name, there ID and there type can be easily found by using object table but how can i print the source table name of these forms in my report.
Why didn't you post this here, so we don't have to guess what you are trying to do?
If I knew this before I would never give such a silly answer as I did in my last posting..... :?regards,
Michael Schumacher
oh, what day is it? Backup day. OK, let's dump all data to /dev/nul ;-)0 -
Give this a try...
PROCEDURE TblIDFromFormID(FormID : Integer) : Integer VAR Obj : Record 2000000001; InStr : InStream; NxtInt : Integer; BEGIN IF Obj.GET(Obj.Type::Form,'',FormID) THEN BEGIN Obj.CALCFIELDS("BLOB Reference"); Obj."BLOB Reference".CREATEINSTREAM(InStr); WHILE NOT InStr.EOS DO BEGIN InStr.READ(NxtInt); IF (NxtInt = 283173) AND (NOT InStr.EOS) THEN BEGIN InStr.READ(NxtInt); EXIT(NxtInt); END; END; END; EXIT(0); END
1 -
Hi
I am also stucked in such situation. I am very much disappointed that many gurus of navision could not resolve my problem.
Please help me, its very urgent.
Regards,0 -
I am very much disappointed that many gurus of navision could not resolve my problem
One can only play in Navision according to the rules of Navision. If it is not possible, it is simply not possible (I know this might come as a surprise to some commercially minded people).
Of course, it might be possible through parsing the compiled BLOB like fb posted (haven't tried it) but that is some serious Navision hacking for which one has to know how Navision stores its information internally. Of course, we all know that when we use undocumented features, they are not guaranteed to remain the same or even be available in different releases. That's why they are undocumented.0 -
fb wrote:Give this a try
Lol, what do you do in your spare time...it does work..do you have more info, hints about undocumented options0 -
Look through fin.stx for 'SourceTable' and you find the following:
00082-00037-030-0: SourceTable
Convert first two numbers to hex:
82 --> 0x52
37 --> 0x25
We could expect that the source table id is stored as a 4-byte integer (e.g., the SourceTable property has a length of 4 --> 0x04). Put these things together, mix in some Intel x86 'back-words' storage nonsense, and you get the following pattern:
0x25 52 04 00 --> base10 integer 283173: the 'magic number' that the code scans for.
I imagine the scan could be fooled by a Name and/or CaptionML property containing just the right combination of characters, but hey -- it's just a hack...
8)0 -
Why would you ever need to figure out the sourcetable like that? Navision is a data-driven application, and you typically open a form based on the table. That is why you can enter a lookup form ID, and a drilldown form ID on the table. What use is it to open a form if you don't know what the form is going to show you?
If this is for development documentation type stuff, then you can export the objects into a text file and look up the values of the SourceTable property opfthe form objects. Or follow fb's advice, he seems to know what he is talking about (chinese to me to tell you the truth :oops: )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