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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Document Template (.DOCM) , CRM, Open XML to read form fields data, Dynamic CRM, C#

(0) ShareShare
ReportReport
Posted on by 193

Can we set or get value from .docm template using C# Open XML, Actually, The requirement is we have template with extension .docm with including form fields and some layout, User has ability to update the document and upload it in CRM using ribbon button and when user uploaded the document then the data should get updated in CRM with OpenXML in the same way, we have button called Create Template, when customer click on it, we need to read the data from CRM and auto populate it in document.I need to achieve this using OpenXML, C#. It will be very thankful, if you share suggestions or help 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    JohnAnonymous Profile Picture
    5,241 on at

    Your question isn't very clear.

    Are you using the default document template solution form CRM, if so which version? Is that button Create Template in CRM, or is it somewhere in your own app? Are you creating the document outside CRM with C# and OpenXML and you want to get the data from CRM?

    In the last case, have a look at the CRM SDK. There are a few samples on how to connect to CRM and get data. (www.microsoft.com/.../details.aspx)

    If you are looking for help with OpenXML, I don't think this is the right place.

  • Balaji Karpurapu Profile Picture
    193 on at

    Hi Martijn, Thank for your reply.

    Replies : 1. We are not using OOB document template feature.

                 2. We've added the Ribbon Button called "Create Template" in CRM

                 3. Yes, I've template in .DOCM format with Text fields and layout. The data should suto populate from CRM with C#, Open XML. I want to  read Text Box or form fields  ID's from .DOCM template to populate the data.

                 4. Can you please help me on this.

  • Suggested answer
    JohnAnonymous Profile Picture
    5,241 on at

    I don't know if this is possible to within CRM. It should be possible outside CRM, calling back into CRM to get the data. As said, please look into the SDK for examples on how to get data from CRM. And as Open XML is not CRM specific you might want to ask those questions on e.g. Stack Overflow.

    If you have specific questions on how to connect to CRM and get data, I think it's better to open a new topic.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans