Skip to main content

Posts

Showing posts with the label invoking flows from custom button

Salesforce Visual Flow - Invoking Flow from Custom Button/Custom Links

The following piece of code snippet will help you invoke a visual flow from Custom Button/ Custom Links. Prerequisites   : The flow which you are about to invoke should be active. This below sample snippet is a Custom Link created on USER object. Limitation : We cannot create a Custom Button on User Std Object in salesforce. Display Type : Detail Page Link Behavior : Execute JaveScript Content Source : OnClick JavaScript {!REQUIRESCRIPT("/soap/ajax/28.0/connection.js")}  {!REQUIRESCRIPT("/support/console/28.0/integration.js")}  {! IF( User.isActive , "allowInvokeFlowFunction() ;" ,"alert('The user seems to be Inactive');")} function allowInvokeFlowFunction(){ var url = '/flow/ You_Flow_API_Name ?inputUserID={!User.Id}';  if (sforce.console.isInConsole()) {        sforce.console.openPrimaryTab(null, url, true);  } else {        window.open(url,'_blank');  } } In the