Job Scheduler & Dataports Setting
pang
Member Posts: 13
I am trying to do a setup to run dataports on Job Scheduler. We added a file path for each job so the dataport request form doesn't need to be shown.
Does any one know if I have to change the dataport to make the UseReqForm set to false? I know this will work. And Looks like it can't be changed by the code. But the customer also like to manually run the dataport in the mean time. So now looks like I have to make a copy of each dataport for running it manually.
Any suggestion will be appreciated.
Does any one know if I have to change the dataport to make the UseReqForm set to false? I know this will work. And Looks like it can't be changed by the code. But the customer also like to manually run the dataport in the mean time. So now looks like I have to make a copy of each dataport for running it manually.
Any suggestion will be appreciated.
0
Comments
-
Hi Pang,
You could create a codeunit ( or report ) to run the dataports in the job scheduler and use
dataport.run( number, false );
Where number is the dataport number and false turns off the request form0 -
Thanks Dave,
But this way I couldn't pass through the file path in there. The idea is to set the path outside of the codeunit.
I did a report to run through all the scheduler and read all the files under the path use file table.
ImpFile.RESET;
ImpFile.SETFILTER(Path,DELCHR(FilePath,'>','\'));
ImpFile.SETRANGE("Is a file", TRUE);
dptImp.FILENAME := ImpFile.Path + '\' + ImpFile.Name;
dptImp.RUNMODAL;0 -
Hi Pang,
You can solve this by using the
dataport.run( number, false );
and then in the dataport in the onpredataport trigger putIF CurrDataport.FILENAME = '' THEN CurrDataport.FILENAME := 'c:\davetest.txt';
and lookup the filename as you were doing.
This will allow the user to run manually and select their own file.0 -
The customer want to run a bunch of files under a folder. That's why I use the file table.
And if I add the file table loop to the dataport, I need to do it for maybe 10 dataports. And I am not sure if it will work for manually running. e.g. select single file.0 -
Hi Pang,
Then another suggestion - generate output to a fixed filename/path and rename it when dataport is finished0 -
If you want to run the jobscheduler from a NAS, you CAN'T use dataports. You need to convert them to a codeunit or a report.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 327 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