Using SetWordTemplate action to automate document generation and attaching it to note in Dynamics 365


Continuing our previous post,

https://nishantrana.me/2020/03/31/using-word-template-to-combine-multiple-images-attached-to-notes-in-a-single-document-in-dynamics-365/

wherein we used word template to generate a document having all the note’s attachments (picture) to it.

To enhance it further, we can write a custom workflow that calls the SetWordTemplate in Perform Action step.

SetWordTemplate action will generate the document, based on the word template defined, and will attach the document to the note of that particular record.

For this

  • Create a process of type workflow.

  • Select step Perform Action

  • Specify the Document Template and the associated entity (e.g. lead) for its input properties.

*if you do not see the entity listed, enable BPF on it

*also make sure you have notes enabled for the entity.

  • Activate the workflow.

  • Run the workflow Generate Word
    Template.

  • After refreshing the timeline, we can see the new note record created with the document as attachment to it.

The generated document à

Now as we do not have option of running On Demand Workflow from Dynamics 365 Mobile / Tablet app.

It seems like April 2020 Release Wave 1 has added this feature to the mobile app

OnDemandWorkflow

So here instead of on demand workflow, we can have a custom workflow to run on change of a specific field.

For e.g. we can add a custom field named when it is updated to Yes, we perform the same action

The workflow

This way we will be able to perform the same function within Dynamics 365 Mobile and Tablet App

Hope it helps..

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

3 thoughts on “Using SetWordTemplate action to automate document generation and attaching it to note in Dynamics 365”

Please share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.