Scenario Overview

In this scenario our business requirement is to validate that the Estimated Close Date on the Opportunity record cannot be set to a date before the create date.

N52 Formula Manager Solution

The Formula Manager solution works like this,

  • We create a formula that fires on the create & update events of the Opportunity entity
  • The formula needs to execute on the client-side (i.e. when user tabs out of date field)
  • The formula needs to execute on the server-side (i.e. if importing a CSV file, or via a 3rd party integration, etc.)
  • We set the Mode to Client Side & Server Side to meet the above requirements.
  • When the formula executes it makes the date comparison & if it fails shows an error message



N52 Formula Manager Steps

  • Create a new formula of type 'Validation'
  • Set the Event field to just 'Create & Update'
  • Set the Mode field to 'Client Side & Server Side'
  • Set the Source Entity to 'Opportunity'
  • Set the Source Entity Property 'Est. Close Date'
  • Click 'N52 Commands -> Toggle Advanced View' and change the pick-list field 'Stage' to have the value 'Post-Operation'
  • Copy & paste the formula below into the formula description field & click save
  • You are ready to test


if( [opportunity.createdon] > [opportunity.estimatedclosedate],
  'You cannot have an estimated close date before the create date', 'NoOp')


Did you know?

North52 TestShield benefits Dynamics 365 apps testing

Benefits of using North52 TestShield's automated testing framework for Dynamics 365 apps:

1. Accelerate Automated Testing
  • Enables continuous testing of Dynamics 365 apps with speed and agility
  • No-code test designer enables non-developers to build tests
2. Improves Test Coverage
  • Better ROI by a reduction in UAT defects and production defects
  • Defect prevention at early stages of the project life cycle
3. Fix Defects Faster
  • Get fast feedback on the impact of process changes
  • Repeatable automated test execution simplifies problem solving
  • Quickly resolves failing conditions from complex end-to-end tests
4. Faster Delivery and Higher Quality
  • Broader test coverage and fewer defects released to production
  • Reduced risk and faster release cycles through earlier and automated testing
  • Lower costs related to complex test environment management
  • Reduces time to market by validating builds faster
5. Increased Testing Productivity
  • Assist in the generation of automated test scripts that are repeatable and extensible
  • Detailed analysis of test trace logs enable easy detection of errors to be fixed
  • Automation can perform regression tests which ensures system stability while enhancing the application continuously
  • No manual operation increases efficiency and quality of testing

Learn more about TestShield