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.
N52 Formula Manager Solution
The Formula Manager 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.
N52 Formula Manager 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
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
Did you know?
We listen to customer feedback!
Although our business rules engine for Dynamics 365 has over 500 functions, sometimes you'll come across a requirement for which we don't provide a specific function for. Let us know the details and our team will be happy to review your requirement or suggestion and either provide a solution from our existing toolset or look to enhance our product to meet your requirements.