web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Copy attachment from Quotation to Sales Order

(0) ShareShare
ReportReport
Posted on by 9

Hi all,

I am looking for a way to copy the file I have attached to a quotation line (image 1) and/or a general attachment (image 2) to the Sales Order whenever I confirm the Quotation. I am using AX 2012 R2. I searched through the parameters but I can't get it working... I found that the option is available in the R3 release. 

I made a quotation, attached a document and now the blue "document icon" appears on the quotation line (see attached image 1). When I confirm and promote the Quotation to Sales Order, the attachment is lost however. 

3750.2.png

Thank you for your help,

Best regards,

Luuk Schulte

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Sohaib Cheema Profile Picture
    48,693 User Group Leader on at
    RE: Copy attachment from Quotation to Sales Order

    All attachments have reference inside DocuRef (Table). you need to do following

    Simply Create a New record in DocuRef (Table) with following

    1. Reference of new table and record (reftableid and refrecid) in your case it will be of sales lines
    2. take path and name of file from record of DocuRef which exist for SalesQuotataionLine

  • Suggested answer
    Rachit Profile Picture
    4,015 User Group Leader on at
    RE: Copy attachment from Quotation to Sales Order

    In addition to good description from Sohaib, you can also refer to standard AX function, \Classes\smmDocuments\fileCopy() to get an idea. You might not need to use the complete code but can extract the code relevant to you.

  • Manikanda Gopal Profile Picture
    258 on at
    RE: Copy attachment from Quotation to Sales Order

    Hi ,

    I am too facing same problem.. Please take a look at this question " community.dynamics.com/.../166810;

  • Sohaib Cheema Profile Picture
    48,693 User Group Leader on at
    RE: Copy attachment from Quotation to Sales Order

    Jackie,

    go on your thread to find answer

  • Suggested answer
    Loz Saunders Profile Picture
    51 on at
    RE: Copy attachment from Quotation to Sales Order

    I know this an old thread but in case others are looking for an answer, here's a simple solution. In the SalesQuotationEditLinesForm_Sales_Confir class, add the following code to the updateNow method, after the line this.writeJournal(); around line 67:

    Docu::copy(salesQuotationTable, salesTableCreated);

    The attachment from the quotation will now be copied to the sales order whenever a quotation is confirmed.

  • Suggested answer
    Roger M. Profile Picture
    302 on at
    RE: Copy attachment from Quotation to Sales Order

    Great, As an addition to your post it could be fine add the same code in SalesQuotationEditLinesForm_Sales_Confir .createSalesLines. After salesLine.Create(....) add this: Docu::copy(salesQuotationLineUpdate, salesLine);

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans