You need to sign in to do that
Don't have an account?
APEX CPU TIME OUT B/C of Marketo Trigger
Hi There,
I have a Salesforce Process that automatically changes a Contact's Owner to match the Account Owner upon Account Owner Change.
This process seems to be getting tripped up by a Marketo Trigger from the Marketo Sales Insights Managed Package, but I cannot see the code behind it to troubleshoot. Here is the error message I get:
"UPDATE --- UPDATE FAILED --- ERRORS : (CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY) mkto_si.RemoveInterestingMomentLinebreaksContact: System.LimitException: Apex CPU time limit exceeded"
I wrote to Marketo and they said this:
"The Apex CPU trigger is actually within Salesforce. As we do not have any access to drill down into Salesforce, we cannot fix it. Marketo isn't causing the Apex trigger, Marketo is trying to update a field within Salesforce and the Salesforce Apex CPU time out is happening before Marketo's update can process. This is why you are getting the update failed error. "
My gut says it's because the code within the trigger, but I can't see it because it's a managed package.
Anyone have any work around for this? I am just updating ~100 account records so I'm not sure why this would be timing out.
To avoid CPU limit you need to optimize your code. Here are few tips:
1) Check the trigger execution and note the required time.
2) With the help of developer console you can figure out where cup time is spent and then target the area which most CUP costly.
3) try and optimize those costly code blocks
4) Note for optimization of trigger you can use anomalous block to fire trigger
Ref: https://developer.salesforce.com/page/Troubleshooting_Apex_Performance_Problems
Regards,