• About
  • Contact me!

Salesforce Everywhere

~ Blog on Salesforce Dev and admin stuff

Salesforce Everywhere

Tag Archives: Salesforce Record Types

Populate Opportunity Record type with Lead Record Type

28 Saturday Feb 2015

Posted by Mani in Salesforce Configuration

≈ Leave a comment

Tags

Salesforce Record Types

Welcome to my first post!

In this post, I will explain how we can populate Opportunity record type with Lead record type by using Configuration.

Record types allow us to offer different business processes, picklist values, and page layouts to different users.

Requirement:

Lead has record types (lets say Sales and Support) and the same record type is there for Opportunity too. When a lead is converted to Opportunity, based on the lead record type, Opportunity record type need to be set. For example, when a Sales lead is converted, it should create only Sales Opportunity.

Solution:

No trigger/apex code is required and the desired functionality can be achieved through configuration.

Steps are as follows:

a. Create a Formula field (say rectype) in Lead object with the value as RecordType.Name and set the return type of the field as Text. This will store the record type of the lead.
b. Create a text field (say Lead rectype) in Opportunity object to store Lead Record type.
c. Click on Map Lead fields under Lead Object->Fields. Map the field created in step a to the Opportunity field created in step b.
d. Create a workflow rule under Setup->Create -> Workflow & Approvals to set Opportunity record type(for example to Sales).
1. Evaluation criteria – Set it to “Evaluate the rule when a record is created”. we want the rule to fire every time when a record is created.
2. Set the rule criteria as Opportunity: Lead rectype equals Sales.
3. Add Workflow action as New Field Update. Field to Update as Opportunity: Opportunity Record Type and specify new field value as Sales.
4. Remember to activate the workflow as its not active by default. This can be done by going to Setup->Create->Workflow & Approvals-> click on Activate for the workflow created in step d.

Please share your comments/suggestions.

Advertisement

Blog Stats

  • 114,771 hits

Archives

Recent Posts: Salesforce Everywhere

How to get field values on onLoad in lightning-record-edit-form in LWC?

Using Dynamic Actions

How to check if the logged in user is a Guest user or not in APEX class?

How to Close Quick action in LWC

Lightning component to filter Products and display results in lightning data table

Connect with me

  • View @manibalan_s’s profile on Twitter
  • LinkedIn

Developer links

  • Salesforce Developer website
  • Salesforce Success Community

Enter your email address and click on Follow us (below) to follow this blog and receive notifications of new posts by email.

Website Powered by WordPress.com.

  • Follow Following
    • Salesforce Everywhere
    • Already have a WordPress.com account? Log in now.
    • Salesforce Everywhere
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar