Automatically save a document using "Send-to program" as blo
kbjerno
Member Posts: 6
Is it possible some how to use the function Send-to program and in same loop fetch the file and save it into NAV?
On both Classic and RTC
(Using NAV ver 9 SP1)
On both Classic and RTC
(Using NAV ver 9 SP1)
0
Comments
-
You need to modify codeunit 403 "Application Launch Management", which controls the document creation. You need to add code to the LaunchApp function to make the ApplicationXML (automation server of type 'Microsoft XML, v6.0'.DOMDocument60) save the file to disk. Since you control the file name / location, you can then add code to make use of it (e.g. attach it to an email, etc). Here is an example:
AppStylesheet.SETRANGE("Style Sheet ID",StylesheetID); IF NOT AppStylesheet.FIND('-') THEN EXIT(FALSE); AppStylesheet.CALCFIELDS("Style Sheet"); AppStylesheet."Style Sheet".CREATEINSTREAM(InStream); CREATE(StylesheetXML); StylesheetXML.load(InStream); EVALUATE(id,GetAttributeValue(DataXML,'Object','id')); CASE id OF FORM::"Customer Card": AddCustomerLetter(DataXML); FORM::"Vendor Card": AddVendorLetter(DataXML); FORM::"Contact Card": AddContactLetter(DataXML); FORM::"Sales Quote": AddSalesQuote(DataXML); FORM::"Sales Order": AddSalesOrder(DataXML); END; AddLocaleInfo(DataXML); DataXML.transformNodeToObject(StylesheetXML,ApplicationXML); //some code here to determine the file name and location - I've hard coded below for this example ApplicationXML.save('c:\test\app.xml'); //some code here to do something with the file EXIT(TRUE);0 -
Tried that and that works in classic client but not til RTC - and that is, of course, what I need

Any other good ideas?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
- 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