In this scenario, we want to ensure the quality of all Contact Addresses. We want to run a check on the addresses in the Contact entity to make sure they do not use the special characters " , ; , < , >
We will run this formula whenever a Contacts Address fields have been changed (or created) . It will catch the changes to the Contact record before they are sent to the database and remove any of the special characters above.
North52 Decision Suite Solution
The North52 Decision Suite solution works like this:
- A formula of type 'Save - Perform Action' is created on the Contact entity
- This Formula will be triggered whenever an Contact is created or any of the fields below are updated
- Address 1: Street 1 Address 1: Street 2 Address 1: Street 3 Address 1: City Address 1: State/Province Address 1: ZIP/Postal Code Address 1: Country/Region
- The formula will search the address fields and remove any of the following characters " ;,<> before the fields are saved to the database
North52 Decision Suite Steps
- Create a new formula of type 'Save - Perform Action'
- Set the Mode to 'Server Side'
- Set Event to 'Create & Update'
- Set Source Entity as 'Contact'
- Set Source Property (by holding Ctrl) to:
- Address 1: Street 1
- Address 1: Street 2
- Address 1: Street 3
- Address 1: City
- Address 1: State/Province
- Address 1: ZIP/Postal Code
- Address 1: Country/Region
- Expand Deployment Settings, click on Pipeline Stage and set it to 'Pre-Operation (Synchronous ) '
- Right-click the Decision Sheet and select Set Sheet Options > Use Target Entity
- Note that if you are on the Formula Editor instead of the Decisions Table, click on Commands >Toggle Editor
- Click on cell A2
- Right click and select Delete > Delete Column
- We don't need any conditions for this example
- Select column B to G
- Right click and select Insert > Insert Action
- Click on cell A2 again
- Go to the Source tab and search for "Address 1: Street 1"
- Select 'Address 1: Street 1'
- Select cell A4
- Click on the X on the right hand side to expand the formula editor.
- Enter ReplaceMultiple(XXX, '",>,<,;', '')
- Highlight the XXX
- Click the Source tab and select 'Address 1: Street 1'
- It now should be ReplaceMultiple([contact.address1_line1], '",>,<,;', '')
- Collapse the editor by clicking on on X in the top right corner again
- Click on cell B2
- Repeat above steps for all address fields, moving to the cells beside the previous.
- Click Save
- You are now ready to test.
To test this, go to a contact record and enter any of the following characters into one of the address fields from above. When you save, the character will be removed from the record.
Did you know?
You can easily schedule recurring processes or CRM record updates
Every business has recurring processes and tasks that need to be done on repeatable and scheduled basis. Microsoft Dynamics 365 users are often surprised to learn that it is difficult to achieve using standard functionality. The North52 Scheduler makes it easy to trigger workflows and/or advanced business logic for specific entity records on a scheduled basis.
Key features include:
- Create Recurring Schedules within Dynamics 365
- Powerful Record Targeting - easily create queries to target a specific set of records
- High Performance - can process 100,000+ records on a scheduled basis
- Execute Workflow/Action or Update Entities
- Native to Dynamics 365