Scenario Overview

In this scenario we need to validate that the SSN field on the Contact entity is in the correct format. If it is not in a valid format then we need to display a message to the user and stop the save from occurring. The validation rule needs to fire when the user changes data with the SSN field. (i.e. the  onChange() event)

North52 Decision Suite Solution

The North52 Decision Suite solution works like this,

  • We create a formula that executes on the client-side when ever the SSN  field on the Contact entity changes.
  • We use a Regular Expression to perform the format validation
  • If the validation match returns false an error message will be displayed to the user
  • Otherwise it will pass

North52 Decision Suite Steps


  • Create a new formula of type 'Validation'
  • Set the Source Entity to 'Contact'
  • Set the Mode to 'Client-Side'
  • Set the Source Property to 'SSN' on the desired forms & also select 'OnSave'. (Use Ctrl key to multi-select)
  • Copy & paste the formula below into the formula description field, change the field reference to your SSN field
  • Click save
  • On the Command Bar click 'N52 Commands - Publish Formula'
  • You are ready to test


if( RegexIsMatch([contact.new_ssn]  , «^\d{3}-\d{2}-\d{4}$») , 'NoOp' , 
'You have entered in an invalid SSN. Please resolve this issue.')


Did you know?

North52 provides Automated Testing for Dynamics 365

TestShield® is a unique solution that helps you automatically test your End to End Dynamics 365/CRM and Power Automate processes.  It is built on the proven and robust North52 Business Process Activities rules engine and offers the ability to repetitively test and report on your key business processes.

TestShield's key features:

  • Fully integrated with Dynamics 365
  • Easy to use by BA's, Testers, and Developers
  • Advanced test data generation and management
  • Codeless advanced testing reduces test creation time
  • Test and validate across all layers with a single test

Learn more about TestShield