Attaching a Document to a Quote

Ok, I have figured out how to get a file attached. However it
attaches the incorrect file name. Here is the modified code:


find xfileattch where xfileattch.company = quotehed.company
and xfileattch.key1 = string(quotehed.quotenum)
and xfileattch.relatedtofile = "QUOTEHED"
and xfileattch.attachnum = 5
no-lock no-error.
if not available xfileattch then do:

create xfileattch.
assign xfileattch.company = quotehed.company
xfileattch.key1 = string(quotehed.quotenum)
xfileattch.key2 = ""
xfileattch.key3 = ""
xfileattch.key4 = ""
xfileattch.key5 = ""
xfileattch.relatedtofile = "QUOTEHED":U
xfileattch.attachnum = 5.

create xfileref.
assign xfileref.company = quotehed.company
xfileref.xfilename = Outname
xfileref.xfiledesc = "RTF Quote File":U.

end.

--- In vantage@yahoogroups.com, "mwliquidhappy" <liquidhappy@...>
wrote:
>
> I have noticed that while running tracing and creating an
attachment
> that it seems to create a table called "quotehedattch". I have
> modified my code to go like this:
>
> find quotehedattch where quotehedattch.company = quotehed.company
> and quotehedattch.quotenum = string(quotehed.quotenum) no-lock no-
> error.
>
> if not available quotehedattch then do:
>
> create quotehedattch.
> assign quotehedattch.company = quotehed.company
> quotehedattch.quotenum = quotehed.quotenum
> quotehedattch.drawingseq = 0
> quotehedattch.xfilerefnum = 0
> quotehedattch.drawdesc = quotehedattch.quotenum + ".rtf"
> quotehedattch.filename = outname.
> end.
>
> but it doesn't work. Am I missing something?
>
> --- In vantage@yahoogroups.com, "Stan Chmura" <schmura@> wrote:
> >
> > In 6.1 I have attached pdf's (and other documents) to quotes
through
> > Document Association. To do this, first you'll need the string
for
> the
> > print and view commands in Document Association set up. That
> you'll find in
> > system Management/Configuration maintenance . For pdf's it is:
View
> > AcroRd32.exe "&1" and Print is AcroRd32.exe /p "&1". Then on the
> quote,
> > each line has a Doc. Assoc. icon in the upper right corner. Just
> update the
> > line and click on the icon to add the path to the document.
> >
> >
> >
> >
> > _____
> >
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> Behalf Of
> > mwliquidhappy
> > Sent: Friday, May 18, 2007 11:20 AM
> > To: vantage@yahoogroups.com
> > Subject: [Vantage] Attaching a Document to a Quote
> >
> > I am trying to figure out how I can write progress code to attach
a
> > document to a quote. Has anyone done this before that would have
a
> > code snippet or be able to tell me how to code this?
> > Thanks!
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
I am trying to figure out how I can write progress code to attach a
document to a quote. Has anyone done this before that would have a
code snippet or be able to tell me how to code this?
Thanks!
In 6.1 I have attached pdf's (and other documents) to quotes through
Document Association. To do this, first you'll need the string for the
print and view commands in Document Association set up. That you'll find in
system Management/Configuration maintenance . For pdf's it is: View
AcroRd32.exe "&1" and Print is AcroRd32.exe /p "&1". Then on the quote,
each line has a Doc. Assoc. icon in the upper right corner. Just update the
line and click on the icon to add the path to the document.




_____

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
mwliquidhappy
Sent: Friday, May 18, 2007 11:20 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Attaching a Document to a Quote

I am trying to figure out how I can write progress code to attach a
document to a quote. Has anyone done this before that would have a
code snippet or be able to tell me how to code this?
Thanks!



[Non-text portions of this message have been removed]
Well, so far I have this:

find drawings where drawings.company = quotehed.company
and drawings.key1 = string(quotehed.quotenum)
and drawings.relatedtofile = "QUOTEHED"
and drawings.drawingseq = 5
no-lock no-error.
if not available drawings then do:

create drawings.
assign drawings.company = quotehed.company.
drawings.key1 = string(quotehed.quotenum).
drawings.key2 = "".
drawings.key3 = "".
drawings.key4 = "".
drawings.key5 = "".
drawings.relatedtofile = "QUOTEHED":U.
drawings.drawingseq = 5.
drawings.filename = Outname.
Drawings.drawdesc = "Quote Document":U.
end.

but it spits out an error.

--- In vantage@yahoogroups.com, "Stan Chmura" <schmura@...> wrote:
>
> In 6.1 I have attached pdf's (and other documents) to quotes through
> Document Association. To do this, first you'll need the string for
the
> print and view commands in Document Association set up. That
you'll find in
> system Management/Configuration maintenance . For pdf's it is: View
> AcroRd32.exe "&1" and Print is AcroRd32.exe /p "&1". Then on the
quote,
> each line has a Doc. Assoc. icon in the upper right corner. Just
update the
> line and click on the icon to add the path to the document.
>
>
>
>
> _____
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
Behalf Of
> mwliquidhappy
> Sent: Friday, May 18, 2007 11:20 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Attaching a Document to a Quote
>
> I am trying to figure out how I can write progress code to attach a
> document to a quote. Has anyone done this before that would have a
> code snippet or be able to tell me how to code this?
> Thanks!
>
>
>
> [Non-text portions of this message have been removed]
>
I have noticed that while running tracing and creating an attachment
that it seems to create a table called "quotehedattch". I have
modified my code to go like this:

find quotehedattch where quotehedattch.company = quotehed.company
and quotehedattch.quotenum = string(quotehed.quotenum) no-lock no-
error.

if not available quotehedattch then do:

create quotehedattch.
assign quotehedattch.company = quotehed.company
quotehedattch.quotenum = quotehed.quotenum
quotehedattch.drawingseq = 0
quotehedattch.xfilerefnum = 0
quotehedattch.drawdesc = quotehedattch.quotenum + ".rtf"
quotehedattch.filename = outname.
end.

but it doesn't work. Am I missing something?

--- In vantage@yahoogroups.com, "Stan Chmura" <schmura@...> wrote:
>
> In 6.1 I have attached pdf's (and other documents) to quotes through
> Document Association. To do this, first you'll need the string for
the
> print and view commands in Document Association set up. That
you'll find in
> system Management/Configuration maintenance . For pdf's it is: View
> AcroRd32.exe "&1" and Print is AcroRd32.exe /p "&1". Then on the
quote,
> each line has a Doc. Assoc. icon in the upper right corner. Just
update the
> line and click on the icon to add the path to the document.
>
>
>
>
> _____
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
Behalf Of
> mwliquidhappy
> Sent: Friday, May 18, 2007 11:20 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Attaching a Document to a Quote
>
> I am trying to figure out how I can write progress code to attach a
> document to a quote. Has anyone done this before that would have a
> code snippet or be able to tell me how to code this?
> Thanks!
>
>
>
> [Non-text portions of this message have been removed]
>