Transfer Header comments from Quote to SO

Hi Dave

One point before I go into more detail that you may feel is irrelevant
your code looks at ttOrderHed in the for each and then looks at
ttOrderDtl in the find.
FOR EACH ttOrderHed EXCLUSIVE-LOCK:
FIND FIRST QuoteHed WHERE QuoteHed.QuoteNum = ttOrderDtl.QuoteNum
NO-LOCK NO-ERROR.

Continuing.....

Are you trying to run this on the CreateOrderBefore or the
CreateOrderAfter?

I have done similar things with copying Character fields that we use for
custom information that need to be on the Quote through Order and the
Job.

The method I have used in the past is:
1. On the CreateOrderBefore copy the Quote Num and SO Num to a buffer
store
2. On the CreateOrderAfter retrieve the Quote Num and SO Num from the
buffer store
3. Pass these variables to another procedure that then searches through
the OrderDtl lines and updates fieldx with the equivalent value from
QuoteDtl.

This allows you to modify the information on the Sales Order once it's
been created. I've had issues before with modifying table buffers and
this appears to be a more robust method, especially when upgrading.

If you want any more help let me know.

Regards Tim

8.03.407A

--- In vantage@yahoogroups.com <mailto:vantage@yahoogroups.com> ,
"ofcwiz" <DavidH@...> wrote:
>
> I'm trying to get the Quote header comment to come across to the SO
created when I run the "Create Sales Order" from the Quote. To place the
Quote header comments into the SO header comments. I have the following
code that runs as Post-processing from SalesOrder.CreateOrderFromQuote.
> --------------------------------------------------
> FOR EACH ttOrderHed EXCLUSIVE-LOCK:
>
> FIND FIRST QuoteHed WHERE QuoteHed.QuoteNum = ttOrderDtl.QuoteNum
NO-LOCK NO-ERROR.
>
> IF AVAIL QuoteHed THEN DO:
> Run lib\UpdateTableBuffer.p(input BUFFER OrderHed:HANDLE,
'OrderComment',QuoteHed.QuoteComment).
> END.
> END.
> -------------------------------------------------
> Any assistance that could tell me why this does not fire would be
appreciated.
> Thanks,
>
> Dave
> 8.03.407C P
>




[Non-text portions of this message have been removed]
I'm trying to get the Quote header comment to come across to the SO created when I run the "Create Sales Order" from the Quote. To place the Quote header comments into the SO header comments. I have the following code that runs as Post-processing from SalesOrder.CreateOrderFromQuote.
--------------------------------------------------
FOR EACH ttOrderHed EXCLUSIVE-LOCK:

FIND FIRST QuoteHed WHERE QuoteHed.QuoteNum = ttOrderDtl.QuoteNum NO-LOCK NO-ERROR.

IF AVAIL QuoteHed THEN DO:
Run lib\UpdateTableBuffer.p(input BUFFER OrderHed:HANDLE, 'OrderComment',QuoteHed.QuoteComment).
END.
END.
-------------------------------------------------
Any assistance that could tell me why this does not fire would be appreciated.
Thanks,

Dave
8.03.407C P
My guess would be there is no data in the ttOrderDtl table

--- In vantage@yahoogroups.com, "ofcwiz" <DavidH@...> wrote:
>
> I'm trying to get the Quote header comment to come across to the SO created when I run the "Create Sales Order" from the Quote. To place the Quote header comments into the SO header comments. I have the following code that runs as Post-processing from SalesOrder.CreateOrderFromQuote.
> --------------------------------------------------
> FOR EACH ttOrderHed EXCLUSIVE-LOCK:
>
> FIND FIRST QuoteHed WHERE QuoteHed.QuoteNum = ttOrderDtl.QuoteNum NO-LOCK NO-ERROR.
>
> IF AVAIL QuoteHed THEN DO:
> Run lib\UpdateTableBuffer.p(input BUFFER OrderHed:HANDLE, 'OrderComment',QuoteHed.QuoteComment).
> END.
> END.
> -------------------------------------------------
> Any assistance that could tell me why this does not fire would be appreciated.
> Thanks,
>
> Dave
> 8.03.407C P
>
Dave,



A couple things to try.



Did you create a Pre-Processing with an action to "Enable dependent post
process directive" and the Post Process Condition was "This directive
has been enable from the Preprocess name directive?



Add lines after the "for each" statement:



If available ttOrderHed then

Message "ttOrderhed found -" + ttOrderhed.OrderNum.



The message will let you see if you found a ttOrderhed. If I remember
correctly the message is displayed in one of the appserver logs (do not
remember which one).



Hope this helps



Dale E. Schuerman

Senior Consultant



RAM Software Systems, Inc.

1701 North Collins Suite 200
Richardson, Texas 75080



972-669-0763 x233 (voice)

972-669-9603 (fax)

mailto:dale.schuerman@...
<BLOCKED::blocked::mailto:dale.schuerman@...> (email)

http://www.ramsys.com <blocked::blocked::http://www.ramsys.com/>
(website)







From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of ofcwiz
Sent: Monday, June 28, 2010 4:29 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Transfer Header comments from Quote to SO





I'm trying to get the Quote header comment to come across to the SO
created when I run the "Create Sales Order" from the Quote. To place the
Quote header comments into the SO header comments. I have the following
code that runs as Post-processing from SalesOrder.CreateOrderFromQuote.
--------------------------------------------------
FOR EACH ttOrderHed EXCLUSIVE-LOCK:

FIND FIRST QuoteHed WHERE QuoteHed.QuoteNum = ttOrderDtl.QuoteNum
NO-LOCK NO-ERROR.

IF AVAIL QuoteHed THEN DO:
Run lib\UpdateTableBuffer.p(input BUFFER OrderHed:HANDLE,
'OrderComment',QuoteHed.QuoteComment).
END.
END.
-------------------------------------------------
Any assistance that could tell me why this does not fire would be
appreciated.
Thanks,

Dave
8.03.407C P




########################################################################
Attention:
This email message is privileged and confidential. If you are not the
intended recipient please delete the message and notify the sender.
Any views or opinions presented are solely those of the author.

This email message has been scanned for Viruses and Content and cleared
by MailMarshal SMTP

For more information go to http://www.ramsys.com
########################################################################


[Non-text portions of this message have been removed]
I do know if you use line comments in your quote the comments would pull into the sales order if you used new line from quote to pull in the line info from the quote. It doesn't work with the header comments I tried it out.

Gary Wojtowicz
AJR Industries, Inc.


[Non-text portions of this message have been removed]