In Dynamics CRM 2011, you have an option to fulfil an order record. Once you fulfil it you cannot modify that record further. Unlike lead and opportunity records, OOB, there is no action button on top ribbon bar that allows you to reopen the fulfilled order record. The very simple way to reopen it is to configure a workflow. One can create an on-demand workflow on order entity and change the status of the order record(s) from “Fulfilled” to “New”. Recently, one of my customers had the same requirement but with one constraint i.e. this action should be performed by users only with specific security roles. All system users cannot reopen the fulfilled orders.
To achieve this we can create our own custom ribbon button on Order record and replace the system button. There could be one configuration entity where system admin can select the security role(s) which can be validated later when user clicks on above custom ribbon button. If logged in user has any of the configured security roles then only that user can reopen an order.
However, I wished to develop this functionality without writing a single line of code. So, below is my no code solution.
My Solution
1. Create one custom entity say “Unfulfilled Orders”
2. Create new N:1 relationship with Order entity (A business required field)
3. Drag the mandatory order lookup control on a form
4. Create one workflow on this custom entity (created in step 1)
In workflow, first check the status of related order whether it is fulfilled or not.
If it fulfilled then only change its status to “New” as described in below screen shot.
5. On Administration tab, select the check box at the bottom of the window i.e.
“Automatically delete completed workflow jobs”
6. Change sitemap to place this custom entity at Settings – underneath Business tab.
7. Change the specific security role(s) which should have an access on the above custom entity.
8. Publish all customization changes.
9. Do not forget to activate the workflow.
And that’s it.
Here, I am done with my solution. Users who have permission on this entity can access it from Settings – Business area. I have configured the workflow to be triggered on two events, on creation of a new record or on change of related order record (change of orderid via lookup control) in edit mode. In both cases the above workflow will trigger and change the status of the related order to “New”. Moreover, it is a quite scalable solution; system administrator can allow/disallow this functionality to specific security role(s).
Please feel free to update this post with your no code solutions to reopen fulfilled order records, if any.