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
Teja SattoorTeja Sattoor 

Auto Lead Conversion when they meet certain criteria

Can someone help me identify what could be the problem.

I have written an apex trigger to convert a lead to contact/account when a checkbox evaluates to true. The formula for the checkbox is TRUE when it is not assigned to the 'default queue' or to the 'default user' who get leads assigned from an integration with Hubspot. We have a Lead Assignment Rule that assigns these leads to 'certain users' or to the default queue. 

So technically, my formula should be evaluated to true only when it is assigned to these 'certain users'. It is working absolutely fine when I test in sandbox which is not connected to hubspot. When I pushed it to production and we get leads from hubspot, the checkbox is always evaluated to TRUE and is converting the contacts assigning them on a random basis. I was just hoping to get a clear idea on the Lead Assignment Rule that might be causing the formula to TRUE at an instance.

Thanks in advance!!