Views:

Scenario Overview

In this scenario the users needed the ability to execute a workflow on an Account record which would generate an email that would go out to the Primary Contact of the Account. 

One of the key pieces is that within the body of the email we must dynamically inject a custom URL based on the 'Account Number'  field on the Account record so we can track who has downloaded the brochure. Below is an example of what the email would look like with the dynamically constructed URL.

N52 Formula Manager Solution

The Formula Manager solution works like this,

  • A formula of type 'Process Genie' is created so it can execute as a step within a workflow
  • When it reaches the 'Process Genie' step in the workflow it will execute the formula
  • The formula looks at the description field of the email and replaces the string of text 'URL_PLACEHOLDER' with the actual URL
  • When it generates the actual URL its uses the regarding field on the Email to lookup on the Account entity the 'Account Number' field

N52 Formula Manager Steps

The following set of steps outline how to create this Formula

  • Create a new formula of type 'Process Genie'
  • Set the Source Entity to 'Email'
  • Copy & paste the formula below into the formula description
  • Click save

Workflow Steps

The following set of steps outline how to create this Formula

  • Create a new workflow named 'Generate Email' on the Account entity
  • Set it to run only 'On Demand'
  • Add a step to create an Email and set the details to be that as shown in the 'Configuration of Email Template' screenshot below
  • Add a new step to the workflow to call the North52 Process Genie and configure it as shown in the 'Configuration of Process Genie' screenshot below
  • You will need to use the shortcode on your formula rather than 'rr6' as shown in our example. Please see the top right hand corner of your formula for the shortcode
  • You need to set the 'Primary Entity ID' parameter on the Process Genie step to be that of the 'Record URL Dynamic' of the Email Step.
  • Add a new step to set the status of the email to pending send so that it will get sent
  • Publish the workflow
  • You are now ready to test

 

Configuration of Process Genie

Email Template Configuration

Formula

UpdateRecord('email',
             [email.activityid] ,
             SetAttribute('description',
             Replace([email.description], 
            'URL_PLACEHOLDER',
            'http://www.mycompany.com?brochureid=1234&accountid=' +
             FindValue('account',
                       'accountid',
                       [email.regardingobjectid],
                      'accountnumber' ) ))
                        )

Wizard - FindValue

Please see below the wizard you can use to create the FindValue() function call used in this formula. 

Note to find the value for Equals Value, you will need to go to the Source tab and search for "Regarding
 
 

Did you know?

TestShield Makes Test Automation a First Class Citizen in Dynamics 365

Test automation principles leads to improved communication, reliability and teamwork as you enhance the ever changing business processes. The team members need to roll out change requests on the existing system and build new applications making automated testing very important. 

Top 3 Benefits of Dynamics 365 Automated Testing:
  • Validated Business Processes: Dynamics 365 Automated Testing provides a robust approach to validate the business rules and process requirements of Dynamics 365 solutions
  • Better Engagement: Dynamics 365 Automated Testing ensures that end users get top-class user experience
  • Faster Delivery Time: Dynamics 365 Automated Testing assures fast delivery time by leveraging automation

The growing number of Dynamics applications that are being developed continuously presents a major challenge for Dynamics 365 testing. With such fast development, organizations need to ensure that these applications are thoroughly and constantly tested before being deployed.

Learn how TestShield helps automate testing in your Dynamics 365 projects