Copy a WorkFlow in SageCRM

By | August 19, 2009
SageCRM provides a fabulous tool called workflow with almost all the primary entities. Using workflow we can define the actual business logic with each entity record in SageCRM.
Creating a workflow is a bit time consuming task because in a workflow we have to create each and every stage of a business process and at the same time we need to define rules i.e. tasks to be done, which should take place on that stage.
What to do if we want a similar kind of functionality but in different workflow? Can we clone the Workflow just like you can clone an order in SageCRM? No you cannot but there is something you can do to copy a workflow.
Just go to Component Manager and create a new component instance to copy workflow. Then go to desired workflow open it for Modification and client on Activate Workflow again. This will script your entire workflow in Component file. Get the script created for workflow and create a new set of ES and ECF files. Paste the Script of workflow in ES file and modify the ECF file accordingly.
Now, if we Run this component file as it is, it will overwrite the existing workflow which is of same name then to avoid this, open the script written in ES file and change the description of workflow. For example if it is “Lead Workflow” originally then change it to “New Lead Workflow” and then save the ES file. You can find this description on Very first line of workflow Script.
If you Run the component it will create a totally New Workflow in CRM exactly same as the old workflow.
Happy workflow’ing 😉

If you find this content useful, Please drop us an email at crm@greytrix.com.