In this scenario the business requirement is to remove any attachment in the CRM system if it is older than 3 years.
North52 Decision Suite Solution
The North52 Decision Suite solution works like this,
- We create a formula of type 'Process Genie' so that it can be called from a workflow
- A workflow is created that calls the 'Process Genie formula '
- A schedule is setup to run nightly that finds all attachments older than 3 years
- When the schedule executes it find all the attachments & calls the workflow which in turn calls the formula to delete the attachment
North52 Decision Suite Steps
The following set of steps will set this formula up for you,
- Create a new formula of type 'Process Genie'
- Set the Source Entity to 'Notes'
- Copy & paste the formula below into the formula description field
- Click Save
- Make a note of the formula short code in the top right hand corner of the formula. In this case 'EGR'
- Create a new workflow based on the screenshot above
- Add the custom workflow activity named 'North52 Process Genie'
- Set the formula short code to EGR
- You are ready now to test
- Use the advanced find as shown below & download the fetch xml
- Create a new schedule
- Set it to execute each night at 2am
- Set the workflow to be the one named 'Remove Attachments
- Paste the fetch xml into the query field
- Click Save
- Start the schedule
UpdateRecord('annotation', [annotation.annoationid], SetAttribute('documentbody', '?'), SetAttribute('filename', '?'), SetAttribute('filesize', '?'), SetAttribute('isdocument', 'false') )
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.