Getting info from .fob-file
jensthomsen
Member Posts: 173
Hi
Is there any easy way of getting information of the content of an .for-file? That is: I have a fob file, and I want to be able to save the information of object types/ID in a table inside Navision? Is it possible to make a copy of table where info is shown when choosing 'Import'???
Jens
Is there any easy way of getting information of the content of an .for-file? That is: I have a fob file, and I want to be able to save the information of object types/ID in a table inside Navision? Is it possible to make a copy of table where info is shown when choosing 'Import'???
Jens
0
Comments
-
You can open the fob file with a text editor. The first part is pure text. So you can open it and read the data and save it in Navision.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
This is core section a dataport from the object manager (on this site for download) It parses through the header of a fob and inserts it in a table.
Where you see the assignments in the On after import just craet a table with these fields.
And this should load that table
A friend of mine Eric in Ann Arbor created the parsing loop.
You would need to add XML ports and Menusuites to the option types
Download the Object Manager to see the whole dataport, table,launch point, etc.
Hope this helps
Steve
Object File Compare - OnBeforeImportRecord()
CLEAR(gteTypeIn);
CLEAR(gteObjectIDIn);
CLEAR(gteRestofLine);
CLEAR(gdaDate);
CLEAR(gtiTime);
Object File Compare - OnAfterImportRecord()
IF (gteTypeIn <> 'Table') AND
(gteTypeIn <> 'Form') AND
(gteTypeIn <> 'Report') AND
(gteTypeIn <> 'Dataport') AND
(gteTypeIn <> 'Codeunit')
THEN
ginSwitch := 0
ELSE
ginSwitch := 1;
IF ginSwitch = 1 THEN BEGIN
gteHoldType := gteTypeIn;
gteHoldObjectID := gteObjectIDIn;
gteHoldName := COPYSTR(gteRestofLine,1,30);
gteHoldDate := COPYSTR(gteRestofLine,35,8);
gteHoldTime := COPYSTR(gteRestofLine,47,11);
END ELSE BEGIN
IF gteHoldType <> '' THEN BEGIN
WITH ObjectModified DO BEGIN
INIT;
ginLineNo := ginLineNo + 1;
"Line No." := ginLineNo;
"Imported by" := USERID; // added as test
INSERT;
CASE gteHoldType OF
'Table' : "Object Type" := "Object Type"::Table;
'Form' : "Object Type" := "Object Type"::Form;
'Report' : "Object Type" := "Object Type"::Report;
'Dataport' : "Object Type" := "Object Type"::Dataport;
'Codeunit' : "Object Type" := "Object Type"::Codeunit;
END;
EVALUATE(gdeObjectID,gteHoldObjectID);
"Object ID" := gdeObjectID;
Name := gteHoldName;
IF DDMMYY THEN BEGIN
gteDay := COPYSTR(gteHoldDate,1,2);
gteMonth := COPYSTR(gteHoldDate,4,2);
gteYear := COPYSTR(gteHoldDate,7,2);
gteHoldDate := gteMonth +'/'+ gteDay +'/'+ gteYear;
END;
EVALUATE(gdaDate,gteHoldDate);
EVALUATE(gtiTime,gteHoldTime);
Date := gdaDate;
Time := gtiTime;
"Version List" := gteRestofLine;
"Object File Name" := gteFileName;
"Date Imported" := TODAY;
"Imported by" := USERID;
"Project Type" := greObject."Project Type";
"Action Taken" := "Action Taken"::Unknown;
"Import Type" := "Import Type"::FOB;
MODIFY;
CLEAR(gteHoldType);
CLEAR(gteHoldName);
CLEAR(gteHoldObjectID);
CLEAR(gteHoldDate);
CLEAR(gteHoldTime);
END;
END;
END;0 -
These are the dataport fields used on import of a fob
Steve
Enabled SourceExpr StartPos Width
Yes gteTypeIn 1 8
Yes gteObjectIDIn 9 12
Yes gteRestofLine 22 570
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions