function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VK86VK86 

Custom object similar to Lead Functionality

Hello all,

 

I have a custom object 'Prospect' and want this to be similar to standard Lead object i.e., a convert button which converts prospect record to Account and Contact.

 

Just an FYI. This is a Force.com enterprise platform where CRM objects (Leads, Campaigns, Opportunities, etc.) are unavailable.

 

Thanks in advance,

VK

Best Answer chosen by Admin (Salesforce Developers) 
jkucerajkucera

VK - it's probably cheaper just to upgrade to a CRM edition or you'll find yourself getting caught in the complexity of convert logic.

 

True lead convert does a lot of stuff:

 - Mark lead flag IsConverted = True

 - Either merge to existing account or create new account

 - Either merge contact to existing contact or create new contact, and set parent Account

 - Create opportunity, and set parent Account

 - Reparent all campaign members

 - Reparent all tasks, and set the whatId to the opportunity

 

Throw in complexity around triggers, workflow, recordtypes, merge, and you find a hairball of logic that is hard to custom code without inadvertently introducing a lot of bugs.  

All Answers

sfdcfoxsfdcfox

You'd have to build it all by hand. You can't just "clone" a standard object.

VK86VK86

Thanks for your reply sfdcfox.

 

Thanks,

VK

NPNP

The other way would be for clone (or any thing similar to );

 

You have a clone button, and pass all the parameter's from the record you are in and then you will have to hit save button.

 

Please let me know,if this helped.

VK86VK86

Hello NP,

 

Can explain your suggestion in a more elaborate way please?

 

Thank you,

VK

jkucerajkucera

VK - it's probably cheaper just to upgrade to a CRM edition or you'll find yourself getting caught in the complexity of convert logic.

 

True lead convert does a lot of stuff:

 - Mark lead flag IsConverted = True

 - Either merge to existing account or create new account

 - Either merge contact to existing contact or create new contact, and set parent Account

 - Create opportunity, and set parent Account

 - Reparent all campaign members

 - Reparent all tasks, and set the whatId to the opportunity

 

Throw in complexity around triggers, workflow, recordtypes, merge, and you find a hairball of logic that is hard to custom code without inadvertently introducing a lot of bugs.  

This was selected as the best answer
VK86VK86

Hello jkucera,

 

Really appreciate puting this in a clear way.

I guess i need to upgrade to CRM.

 

Thanks again,

VK