Enabling and Disabling of Workflow in Sage CRM based on a Field value

By | July 6, 2017

We all are familiar with the JavaScript Codes or say the Client side API and its benefits to ease the customization efforts of programmers in Sage CRM. One such advantage w.r.t CRM Workflows was enabling or disabling of specific rule based on the conditions. But what if you need to disable the whole workflow on particular conditions?

New Stuff: Adding Custom Field on Sage CRM screen using .Net

This blog will explain you an easy way to hide the whole workflow for particular entity record based on the conditions applied.

In below example, we have considered the Case Record Type value (Refund) based on which we have enabled/disabled the workflow. User has to just call this on Onload function of entity screen. Add the following code on custom content of entity screen.

if(document.EntryForm)
{
var sCaseRecType=new String(crm.fields(“case_recordtype”).value())
if(sCaseRecType==”” || sCaseRecType==”undefined” ||CaseRecType==”null”)sCaseRecType=””;
if(sCaseRecType!=””)
{
sCaseRecType=sCaseRecType.toLowerCase();
if(sCaseRecType==”refund”)
{
// Do Nothing
}
else
{
if($(“.workflow”))
{
$(“.workflow”).hide();
}
}
}
}

Once you have added the code on custom content of entity screen then the workflow will be displayed for Case Type of “Refund” as shown in below screenshot.
Also, the Workflow will be hidden for Case record type other than refund as shown in below screenshot.
About Us
Greytrix a globally recognized Premier Sage Gold Development Partner is a one stop solution provider for Sage ERP and Sage CRM needs. Being recognized and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation expertise.

Greytrix has some unique integration solutions for Sage CRM with Sage ERPs (Sage Enterprise Management (Sage X3), Sage Intacct, Sage 100Sage 500 and Sage 300).We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users and Sage PSG worldwide. Greytrix helps in migrating of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes Greytrix Business Manager, Sage CRM Project Manager, Sage CRM Resource Planner, Sage CRM Contract Manager, Sage CRM Event Manager, Sage CRM Budget Planner, Gmail Integration, Sage CRM Mobile Service Signature and Sage CRM CTI Framework.

Greytrix is a recognized Sage Rockstar ISV Partner for GUMU™ Sage Enterprise Management – Sage CRM integration also listed on Sage Marketplace.

For more information on our integration solutions, please contact us at sage@greytrix.com. We will be glad to assist you.