+ Start a Discussion
jadentifyjadentify 

Trigger Not Firing in Managed Package

I have a managed package with a trigger on Lead update. It checks a view things about the lead being converted. The trigger fires properly in the developer org and numerous orgs the managed package is installed in. But there is one org which the trigger does not fire. I have verified it is not running as the debug log never shows any query from the package running or the namespace governing limits at the bottom of the log.

 

The package is deployed (and other features including other triggers are being run successfully). The trigger in question is Valid & status is Active.

 

What else can be stopping the trigger from running?

 

thanks!

A_SmithA_Smith

Is the package expired in the customer's org?  

jadentifyjadentify

No it is not. Other triggers fire from the package just not on lead conversion the lead update trigger isn't firing. 

 

Is there a configuration in SFDC where converting the lead removes the lead record completely? I had them query the converted lead record to check the IsConverted & ConvertedContactId fields on the converted lead and the query came back with no lead. While other orgs you can query the converted lead and see that the lead was converted.

 

thanks

jkucerajkucera

The lead is never deleted by the system during lead convert so something funky is going on.  You can always query for converted leads even after conversion.

 

The first suspect is other people's code - do you know what other packages are installed that have lead triggers or does the customer have any custom triggers they built?  

 

Do the logs show any details of errors for that customer during lead convert?  That's the next place I'd check.

 

 

jadentifyjadentify

Saleforce support believes it may be because the "Use Apex Lead Convert" feature which is not activated in the org. I have never heard of this as a feature that needs to be activated (but perhaps the company requested Salesforce to deactivate it)

 

I have been unable to find any documentation surrounding this feature activation. Anyone here of it?

jkucerajkucera

That would explain why the trigger is firing, but not why the lead is deleted.

 

Have support turn it on for you (Apex Lead Convert).  Without it, triggers & workflow don't fire when a lead is converted on all of the objects.  

 

The potential side effects of turning it on are minimal - some operations happen in a slightly different order, but given what you've shared here, that shouldn't be a problem.  Also, support can easily revert it as well.  If support is slow, send me a note with your org Id and I shouldbe able to help you out (jkucera at salesforce).

 

It's only off for long time customers as all new customers have had it default on for about 3 years.  

 

On a side note, thank you for your ccontinued business over the years!