Search Community
- Force.com Discussion Boards
- :
- Salesforce User Discussions
- :
- Partner Relationship Management (PRM)
- :
- Re: Lead Conversion trigger
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Lead Conversion trigger
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-02-2009 10:44 AM
Hi,
I was wondering if it was possible to create a trigger to check to see if the "Do not create a new opportunity upon conversion." is checked on the Convert Lead page...
I would like to not have to re-create the whole page over, as well as the email functionality, it would be nice to just be able to check to see if that box was checked in a trigger... (does it store that particular field in the Lead Object that is in the trigger.new on before update? if so does anyone have any clue what the lead."key" name is?
any help would be much appreciated.
Axel Jensen
Re: Lead Conversion trigger
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
08-15-2009 10:50 AM
Yes, it is possible to create a trigger or a validation rule to check if the "Do not create a new opportunity upon conversion" is checked or not by checking the field "ConvertedOpportunityId".
If you are trying to enforce a rule at the Lead conversion, you can simply write a Validation Rule on "IsConverted" and "ConvertedOpportunityId" instead of a trigger.
If the field "ConvertedOpportunityId" is not null then the check box is unchecked and if it is null then it means the check box is checked.
To make this work, please make sure you have this option "Enforce Validation and Triggers from Lead Convert" checked under Lead Settings.

