Views:

Scenario Overview

In your business, you may need to restore information that has been changed. 

In this scenario, we are required to revert the phone numbers of all Account entities back to their values from 7 days ago. 

This can be done using auditing and some North52 formula.  

Note : In the real world, we actually scheduled this formula to fire over the course of a couple of nights to allow for the high workload. We removed this part for simplification.  

North52 Decision Suite Solution

The North52 Decision Suite solution works like this:

  • A formula of type Process Genie will be triggered by a Quick Button on the Account entity
  • The formula will gather the auditing values of the Account entity from the last 7 days
  • It will then read the telephone number from 7 days ago and update the Account record with it

Note : For this formula to work, you will need to have auditing turned on for the Account record. 

Please see Microsoft online articles for instruction on how to do this.         
                                                                  

North52 Decision Suite Steps  

The following set of steps outline how to create this Formula:

  • Create a new formula of type 'Process Genie'
  • Set the Mode to 'ServerSide'
  • Set Display Format to 'String'
  • Set the Source Entity to 'Account'
  • Go to the Formula editor
  • Copy and paste the formula below
  • Click Save
  • Copy the Short Code in the top right hand corner for later

  

Formula

SmartFlow(

  xCacheLoadLocal('AuditEC', FindRecordsAudit('account', [account.accountid], 7, 1, false)),


  xCacheFilterLocal('AuditEC', 'Attribute = "telephone1"', 'Date'),

  UpdateRecord('account',
            [account.accountid],
            SetAttribute('telephone1',
            xCacheGetLocal('AuditEC', 'Old Value', '?', 0   )
                )
          )

    )

N52 Create a quick button.

Please follow the instructions at the link here, using the Shortcode of the formula you made above. 

Wizard - FindRecordsAudit

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

Did you know?

North52's Data Packager helps move Portal configuration data between instances

North52 Data Packager can be used to easily manage the transport of portal data from one instance to another. Specifically for Dynamics/PowerApps Portals, we provide templates that let you quickly move all portal entity data with ease. You can move whole sites or only the records you specify, either manually or via FetchXML queries.

And, because we use the Solution framework for the export and import of Data Packager data, you can easily version each data package. This is especially useful if you need to build up a new dev/test portal to a specific version – just apply and execute the Data Packages you need.

Learn more about the North52 Data Packager