Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Attach documents to an email with mapped fields

Posted on by Microsoft Employee

HI All

I have built a system in Dynamics 365, whereby client's purchase products through a customer portal, Once the purchase is complete the client receives a copy of the contract via email, however, the contents of the contract is in the body of the email. I would like to rather attach a word or PDF document to the email but still be able to map the required fields from the contact record to the template word or PDF document.

In Essence, the customer and service provider would receive an email with their contract attached and populated with the relevant fields.

Can someone please point me to an article or provide some direction on how I can make this happen.

Thanks,

Byron

*This post is locked for comments

  • Suggested answer
    Brian Bayes Profile Picture
    Brian Bayes on at
    RE: Attach documents to an email with mapped fields

    Hi Byron,

    You will most likely need a custom C# coded solution involving the following:

    1. Have a plugin registered on the post-create of an email that checks for an attachment

    2. Read the attachment using a library such as iTextSharp: https://itextpdf.com/

    3. Create the contract based on a mapping configuration you would store in CRM

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans