In one of our last posts “Mapping custom lead fields in Salesforce”, we described how we can use the standard salesforce functionality to transfer the custom lead field to custom opportunity field when converting a lead to an account-contact-opportunity [ACO]. Sometimes we may want to transfer the data that is in a custom lead field to a standard field in ACO. Unfortunately, Salesforce does not have this functionality to map from custom objects to standard objects.
One workaround is to use the salesforce workflows. Suppose we have a custom field Asst. Phone in our Lead object and we want to map this field to Asst. Phone field in the contacts object which is a standard field. We can simply create another Asst. Phone custom field in the contacts object and map the lead field to this one. But it can create confusions if we have duplicate fields. We can instead make this field hidden from the page layout and create a workflow rule to copy the data in this field to the standard field.
Here are the steps that we used to achieve this –
- Create a new custom object in Contacts. Select the data type as Phone. Let us name it Workflow Phone.
- Using the lead mapping functionality of Salesforce map the value of Asst.Phone to Workflow Phone in contacts as shown in below screenshot.
- Now we need to create a workflow rule. Go to Setup >> Create >> Workflows and Approvals >> Workflow Rules >> New Rule. The workflow wizard will open. Select Contact in the object dropdown as shown in below screenshot. Click Next.
- Enter a workflow rule name. Set the Evaluation criteria to run the rule when a record is created. In the Rule criteria section, select the field Contact: Workflow Phone. Since we want this rule to run every time the Workflow Phone field has any value, we can select the operator as not equal to and the value as blank. Click on Save & Next. The workflow rule screenshot for above conditions is shown below –
- In the workflow actions screen, under immediate workflow actions, click on the Add Workflow Action dropdown. Select New Field Update.
- Enter a name. Select Asst. Phone in the field to update dropdown. In the specify new field value section, select Use a formula to set the new value. Click on Show Formula Editor. Click on Insert Field. Select Contact – Workflow phone. Click on Insert. Click on Save.
- Now that the workflow action has been defined, the last thing to do is hide the custom phone field (Workflow phone) from the Contacts page layout. To do this, go to Setup>> Customize >> Contacts >> Fields. Click on Workflow phone. Click on Set Field-Level Security. Uncheck the visible checkbox at the top. Click on Save. The field will now be hidden from the contacts page.
Now whenever a lead is converted to ACO, the value in the custom field Asst. Phone will get transferred directly to the standard Asst. Phone field in Contacts. Using the above technique we can map any custom field of the Lead object to any standard field of ACO.
Greytrix as a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners across the globe. We offers Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that requires apex code incorporation into the Salesforce platform.
Greytrix has some unique solutions for Cloud CRM such as Salesforce integration with Sage Enterprise Management (Sage X3), Sage Intacct, Sage 100 and Sage 300 (Sage Accpac). We also offer best-in-class Cloud CRM Salesforce customization and development services along with services such as Salesforce Data Migration, Integrated App development, Custom App development and Technical Support to business partners and end users.
Greytrix GUMU™ integration for Sage ERP – Salesforce is a 5-star app listed on Salesforce AppExchange.
For more information, please contact us at email@example.com. We will be glad to assist you.