Shared file accès on RTC
cmoihamid
Member Posts: 4
Hello experts,
The payroll data for one of our clients are imported from a txt file in a general journal.
A codeunit was developed for this need.
The path to the file parameter from a page and stored in a table.
FilePath:="3tiers".DownloadTempFile(Config."Nom du fichier d'importation");
IF NOT EntryFile.OPEN(FilePath) THEN
ERROR(text01,Config."Nom du fichier d'importation");
The RTC returs everytime the error message
Delegates were configured
This works perfectly on the classic but not on the RTC.
Have you any idea?
The client configuration is:
- Windows 2008
- Dynamics Nav2009 R2
- SQL Server 2008
-- SQL Server and Dynamics NAV server are on the same server
-- RTC is on client
Thank you in advance
The payroll data for one of our clients are imported from a txt file in a general journal.
A codeunit was developed for this need.
The path to the file parameter from a page and stored in a table.
FilePath:="3tiers".DownloadTempFile(Config."Nom du fichier d'importation");
IF NOT EntryFile.OPEN(FilePath) THEN
ERROR(text01,Config."Nom du fichier d'importation");
The RTC returs everytime the error message
Delegates were configured
This works perfectly on the classic but not on the RTC.
Have you any idea?
The client configuration is:
- Windows 2008
- Dynamics Nav2009 R2
- SQL Server 2008
-- SQL Server and Dynamics NAV server are on the same server
-- RTC is on client
Thank you in advance
0
Answers
-
maybe one should wait until the transfer from server to local is complete.0
-
The DownloadTempfile is placing the file in a different location. Please browse thru you temp folder.0
-
You want to import something right?
Then you need to Upload the file, not download. Downloading means you Get something you have on the server like a file you created/writed (which happens on the service tier) to your client to open, or further process it.
Now to import you need to go the other way round, you have a file that is on a path relative to your computer like: C:\temp\myfile, or a network share. You need to use the silent upload function of the 3-tier codeunit to do that then you can open it.
If you don't have the silentupload function (i think is a DACH function) then here it is:// MagicPath Function -------------------------------------------------- Magicpath() : Text[1024] EXIT('<TEMP>'); // MAGIC PATH makes sure we don't get a prompt // SilentUpload Function -------------------------------------------------- SilentUpload(ClientFilePath : Text[1024];VAR ServerFilePath : Text[1024]) Status : Boolean // DACH0001.begin IF ISCLEAR(FileObject) THEN CREATE(FileObject, TRUE, TRUE); Ext := FileObject.GetExtensionName(ClientFilePath); ClientTempFilePath := ClientTempFileName('',Ext); ClientTempFile := FileObject.GetFileName(ClientTempFilePath); FileObject.CopyFile(ClientFilePath,ClientTempFilePath,TRUE); ServerFilePath := ServerTempFileName('',Ext); Status := UPLOAD('',Magicpath,'',ClientTempFile,ServerFilePath); // DACH0002.begin //IF FileObject.FileExists(ClientTempFilePath) THEN // FileObject.DeleteFile(ClientTempFilePath); // DACH0002.end EXIT(Status); // DACH0001.end0 -
Thank you verry much for the answers.
I used the deV.ch's Code, i called the update fonction and that solved my problem.
Best regards0 -
:thumbsup:
Thank you for the silent upload tip! That was exactly what I was looking for.
It was located in code unit 419. I think it is a standard functionalityHello IT, have you tried to turn it off and on?
Have you checked the cables?
Have you released the filters?
http://www.navfreak.com0
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
