Attach document at 3.01 version

RachelSoon
Member Posts: 202
Hi There,
Any one knows how to attach a document at Navision 3.01?
Scenario:
Attached a Sales.doc at the for a sales order document. How to go about it?
Thank you.
Cheers
Rachel
Any one knows how to attach a document at Navision 3.01?
Scenario:
Attached a Sales.doc at the for a sales order document. How to go about it?
Thank you.
Cheers
Rachel
0
Comments
-
Create a new BLOB field in the Sales Header. That field will store your document for you.
Lets say you call it "Document" then this is how the code might look like...
"Exist" is a Boolean Variable, used to see if there is a document in there already, if there is, then ask the user to confirm the deletion of the current document before importing a new one.
"Document Pic" is a field i use to display a pic if there is a Document in the Sales Header.
CALCFIELDS(Document);
Exist := Rec.Document.HASVALUE;
IF Exist THEN
IF NOT CONFIRM(BMIText002) THEN
EXIT
ELSE
CLEAR(Document);
TempFileName_lt := Rec.Document.IMPORT('*.DOC',TRUE);
IF TempFileName_lt = '' THEN
EXIT;
"Document Pic" := TRUE;
MODIFY;
Hope this Helps.Elmar F. Vidisson
Certified Navision Attain Developer0 -
What is the data type of document pic , how to see the document after successful attach it, where did the document attachment display??
10s..elmarfv wrote:Create a new BLOB field in the Sales Header. That field will store your document for you.
Lets say you call it "Document" then this is how the code might look like...
"Exist" is a Boolean Variable, used to see if there is a document in there already, if there is, then ask the user to confirm the deletion of the current document before importing a new one.
"Document Pic" is a field i use to display a pic if there is a Document in the Sales Header.
CALCFIELDS(Document);
Exist := Rec.Document.HASVALUE;
IF Exist THEN
IF NOT CONFIRM(BMIText002) THEN
EXIT
ELSE
CLEAR(Document);
TempFileName_lt := Rec.Document.IMPORT('*.DOC',TRUE);
IF TempFileName_lt = '' THEN
EXIT;
"Document Pic" := TRUE;
MODIFY;
Hope this Helps.0 -
"Document Pic" is a Boolean field that controls a Bitmat on the form in question. Once the "Document Pic" is True, the pictur changes.
I don't know if you can See the document in Navision, but this code exports it so you can open it up..
Rec.Document.EXPORT("DOCUMENT NAME." + '.DOC',TRUE).
If you are working with a more recent version of Navision, you can use "CREATEINSTREAM" and "CREATEOUTSTREAM". Just lookup the Navision help to see how they work and code examples.Elmar F. Vidisson
Certified Navision Attain Developer0 -
i have the same problem oso..
but
alert message are prompt out
"Overflow under type conversion of text to text
Value: C:\.....doc"
3q0 -
1. create new segment number
2. fill in the interaction template
3. create new contact number
4. click the look up button in attachment field of contact number.
alert message pop out.
"This message is for C/AL programmers:
Could not invoke the member Active Window. The OLE control or Automation server returned an unknown"
How to solve this problem?
thx in advance..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
- 320 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