In this scenario our business requirement is that when a user tries to delete an Invoice record that has been marked as paid we would like to stop this and show an error message to the user. See the screenshot below for an example,
N52 Formula Manager Solution
The Formula Manager solution works like this,
- We create a server-side only formula that fires for the Delete event of an Invoice
- The formula itself first checks to see if the Invoice has been marked as Paid
- And if true it will show the error message
N52 Formula Manager Steps
The following set of steps show you how to create this formula,
- Create a new formula of type 'Validation'
- Set the Event field to just 'Delete'
- Set the Source Entity to 'Invoice'
- Set the Source Entity Property to 'All Properties'
- Copy & paste the formula below into the formula description field
- Click Save
- You are now ready to test
if( [invoice.statecode] = 2 , 'You cannot delete this Invoice as it has a status of Paid', 'NoOp')
Did you know?
North52's Data Packager helps move configuration data between instances
North52 Data Packager is an add-on for North52 Business Process Activities which enables you to easily move data from one instance to another. Users simply select the records they would like to package up and North52 Data Packager adds the data to a data package sheet, ready for export. Moving the records to another instance requires the package solution to be imported and ‘unpacked’ on the target instance.
North52 Data Packager is ideal for:
- Moving Dynamics configuration records
- Copying Dynamics Portal records
- Distributing demonstration data