You need to sign in to do that
Don't have an account?
Harjeet Singh 28
Custom Lead Conversion to specific oppty record types
Hi All,
I need to auto convert a lead to oppty where converted oppty record type will depend upon the fields on leads.
My use case is something like below:
Let's say I have 2checkbox fields on leads checkbox 1 and checkbox 2.
So if I select checkbox1 then lead will convert to oppty with recordtype1
And if I select checkbox2 then lead will convert to oppty with recordtype2
Assume recordtype1 and recordtype2 exists on oppty. Also there are validations in place to ensure user can't select both checkboxes(which I have already created)
What are my options available to achieve the above?
I am aware about lead conversion using Process builder which invokes an invocable method in an Apex class and convert the leads to res account, contact and opportunity but I am not sure how can I set the record type of opportunity while conversion
Kindly help
Many thanks in advance
Thanks & Regards,
Harjeet
I need to auto convert a lead to oppty where converted oppty record type will depend upon the fields on leads.
My use case is something like below:
Let's say I have 2checkbox fields on leads checkbox 1 and checkbox 2.
So if I select checkbox1 then lead will convert to oppty with recordtype1
And if I select checkbox2 then lead will convert to oppty with recordtype2
Assume recordtype1 and recordtype2 exists on oppty. Also there are validations in place to ensure user can't select both checkboxes(which I have already created)
What are my options available to achieve the above?
I am aware about lead conversion using Process builder which invokes an invocable method in an Apex class and convert the leads to res account, contact and opportunity but I am not sure how can I set the record type of opportunity while conversion
Kindly help
Many thanks in advance
Thanks & Regards,
Harjeet
first you need to fetch the recordtype ids from opportunity, you can get it by using below code. in place of Opportunityrecordtype1 and Opportunityrecordtype2, provide the record type names that were present in your org.
then you can have if condition on lead. same for other checkbox too.
Hope it helps for you.