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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Automatically Copy Attachment(s) on Purchase Requisition to Relevant Purchase Order(s)

(0) ShareShare
ReportReport
Posted on by 2,376

Hi All

I have a requirement from customer to copy all attachments from a purchase requisition to all relevant purchase orders. After looking for the solution, I found following two solutions:

1. Customize main method of RequisitionReleaseStrategy class (Reference link)

2. A community post suggesting write code in 'Insert' method. I tried writing code at the end of 'Insert' method on PurchLine table but it is also not working.

Will appreciate if anyone of you can let me know the right place to write code for the subject matter.

Thanks in advance

Haroon

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    304,508 Super User 2026 Season 1 on at

    Hi Haroon,

    Is the first option also not working? Can you share details what you have done exactly and what you mean with 'also not working'? Do you get error messages or is the coding not executed?

  • Muhammad Haroon Profile Picture
    2,376 on at

    Hi Andre

    In first case I write code in 'main()' method of RequisitionReleaseStrategy class and then created a new PR. After all Review/Approval steps, purchase order was automatically created but I think the code in 'main()' method did not run because attachments were not copied. In second case I wrote code at the end of 'insert()' method on PurchLine table but that also did not work. Hope I am clear now.

    Thanks

  • André Arnaud de Calavon Profile Picture
    304,508 Super User 2026 Season 1 on at

    Hi Muhammad,

    If you think that the code did not run, did you update the CIL after the x++ compilation?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans