Hi,
Can i programmatically export Navision object?
The functionality should open File-Save dialog and ask for exported file name, and then export the object to the local hard drive, all this should be done programmatically, ala:
Nav.OpenExportDialog(objID, '*.txt');
FileName := nav.GetExportedObjectFilePath;
//read file in location "FileName"
Or if possible then File-Save dialog shouldn't be shown at all if possible.
The solution would be a form with a button and if user presses the button the exporting would be done.
Can such functionality be done at all?
0
Comments
Take a look here. It's the same princip
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I see that one should use this object to create programmatical key presses in Navision client:
"Windows Script Host Object Model.WshShell"
This should solve what i need, thx you both.
If you export it in this way, you CANNOT import the object with the File=>Import-function. I did something like this in 3.01 with the NAS for replicating objects from 1 DB to another.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I've build a wrapper dll for the Cfrontdotnet....it works fine calling it from NAV but when I give the command to CloseDatabase(), NAV crashes....if I comment the closedatabase the dll doesn't give the error but when I close NAV then again NAV crashes.....
ANY idea why this is happening???????????????? ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)
http://www.mibuso.com/dlinfo.asp?FileID=1123
http://www.mibuso.com/dlinfo.asp?FileID=1123
http://www.codeproject.com/KB/library/AutoupateNAV.aspx?display=Print
The only difference it seems that it is in C#.
http://ssdynamics.co.in
What I've done is I've built a DLL in C# that I'm calling from NAV to Export objects as fob files....
it works fine but sometimes it crashes NAV...and I discovered that crashes NAV when I close the database with CloseDatabase();
This is the code:
Anyone??? Anyone???
http://www.mibuso.com/dlinfo.asp?FileID=1123
http://www.mibuso.com/dlinfo.asp?FileID=1123
I was trying to use importfob and exportfob from cfront in nav2009r2, by following the example https://msdn.microsoft.com/en-in/library/dd338953.aspx, this example is working fine, but while using importfob function in cfront, i am getting the below error for the respective codes
1)
cfront.importfob(vartext,1); //vartext is the file location 'C:\test.fob'
"This data type is not supported by C/SIDE. You can access data from
any of the following data types:
VT_VOID, VT_I2, VT_I4, VT_R4, VT_R8, VT_CY, VT_DATE, VT_BSTR and VT_BOOL"
2)
cfront.importfob(varVariant,1); //varVariant is the file location 'C:\test.fob'
This message is for C/AL programmers:
Type conversion of Text is not possible.
VT_LPWSTR was probably the target type.
I can see that problem is with finding LPWSTR equivalent datatype in nav, same is in exportfob too.
Any idea about this error?
Thanks in advance.