+ Start a Discussion
Joe DavoldaJoe Davolda 

Apex Trigger - Leads & activities


I don't have much developer or coding knowledge.
How can I prevent lead conversion whenever this lead has no activity with the custom field conversation__c checked ?

Appreciate it.
You can do this without code (subject to your requirement)

1. Enable "Require Validation for Converted Leads" option in Lead Settings. This will fire validation rules, workflows, triggers etc. Please read documentation and evaluate risks of enabling it because this may fire unwanted stuff and take counter measures for it.
Lead Settings

2. Create a validation rule with your criteria like this. In my case, I am preventing conversion of Cold leads.

User-added image

Ajay mishraAjay mishra
Hi Jeo,

you can create Validation rule with the below condtion

IsConverted == true && conversation__c == false

If the conversion check box will be false it will show error.
Try this if you find useful. 

Ajay Mishra
Email: mishraajay.m1@gmail.com