Automatic renewal of Entitlement without coding
As mentioned in my previous post, CRM 2015 Update 1 has a nice feature - you can create workflow, action or dialog with entity called Entitlement.
Recently I needed to renew the Entitlements automatically on regular basis.
So there are basically 3 main ways how to do it:
- develop a custom windows service, which will renew the records
- develop a workflow activity or action to call the Renew action (RenewEntitlementRequest)
- create a workflow that will renew it without coding
I will focus on the third option, as it is easiest and it worked in my case just fine.
So, first of all some prerequisites which we need to keep in mind:
- you need to base all Entitlements on some Entitlement template, otherwise copying through workflow will not work and you need to use option 2 mentioned above
- copying with workflow is tricky for monthly renewals, as some months do not have 30 days
- workflow for copying is waiting for the whole period of the entitlement, so the performance must be taken into account if you have a lot of entitlements
- in case you have really o lot of them, you could create Entitlements using import for the whole year in advance and activate them. Then they will be in the Waiting status until their first day - actually this I would do in previous CRM versions
We start with Entitlement templates - create at least one.
Then go to the processes and create a workflow which look like this:
The workflow should be started as a new Entitlement is created. This way you will be able to loop it.
Also you can enable manual start when you already have some Entitlements in the system.
Second step is to create the copy of Entitlement. Here is the screen:
Then just save and activate the workflow.
Keep in mind, that it must be Asynchronous, as there is a Waiting condition used.
I hope you find this helpful some day.