Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

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

(0) ShareShare
ReportReport
Posted on by 2,309

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

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,759 Super User 2024 Season 2 on at
    RE: Automatically Copy Attachment(s) on Purchase Requisition to Relevant Purchase Order(s)

    Hi Muhammad,

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

  • haroonattari Profile Picture
    haroonattari 2,309 on at
    RE: Automatically Copy Attachment(s) on Purchase Requisition to Relevant Purchase Order(s)

    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
    André Arnaud de Cal... 291,759 Super User 2024 Season 2 on at
    RE: Automatically Copy Attachment(s) on Purchase Requisition to Relevant Purchase Order(s)

    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?

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,759 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,468 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans