Views:

Scenario Overview

In this scenario we require a max character limit of 25 characters for the Account fields Street 1, Street 2 and Street 3. Any characters over this limit will be truncated. We want this rule to be applied to data BEFORE it is committed to the database and no matter where it comes from - e.g. from an import, SDK call, standard input form. The SetEntityTargetRecord function allow us to do this.

North52 Decision Suite Solution

The North52 Decision Suite solution works like this:

  • A formula of type SavePerform Action is created that triggers on creation or updating of Account fields: Address 1: Street 1 , Address 1: Street 2 and  Address 1: Street 3
  • The formula ignores any characters after the 25th character
  • The formula does this at the Pre-Operation stage so that the fields are validated before they are saved into the database 

North52 Decision Suite Steps

Setup

  • Create a new formula of type 'Save- Perform Action'
  • Set the Event to 'Create and Update'
  • Set the Source Entity to 'Account'
  • For Source Property Ctrl-click  'Address 1: Street 1, Address 1: Street 2 and Address 1: Street 3'
  • Scroll down to Deployment Settings and for the Pipeline Stage select 'Pre-Operation'
  • In the Formula Editor, paste in the Formula provided below
  • Click Save
  • The formula is now ready for testing 

Formula

SetEntityTargetRecord(
    SetAttribute('address1_line1', left([account.address1_line1], 25) ),
    SetAttribute('address1_line2', left([account.address1_line2], 25) ),
    SetAttribute('address1_line3', left([account.address1_line3], 25) )

    ) 

 

                                 

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