+ Start a Discussion
SuzanyuSuzanyu 

Bloody~~~~ Trigger in Production (Bomb!!!!!!)

Hi All,
 
I have an urgent issue. Please give me ideas. Many thanks
 
-- one trigger on account
-- this trigger deployed into producton in a managed package. That means we can not do any modification on that. Even no way to edit "active" checkbox.
-- Code "Schema.getGlobalDescribe().get('Account');" in this trigger
-- when I use apex dataloader mass upload data, an error depressed me
 

caused by: System.Exception: Too many fields describes: 11

I think the Governors and Limits for describe call in trigger allows max no. is 10 as well.  Is that true?????????

-- This trigger calls apex class code. In the apex class code there is a Webservice method callout. In this apex class code, there is a "future" annotation as well. In the apex developer document, governors say

Total number of methods with the future annotation allowed  per Apex invocation7     :   10

Total number of Web service methods allowed :  10

I believe if mass update records number > 10 , those limits will reach and some error  will occur.

-- How can I turn off the trigger in Production which in managed package (released version).

 

Any idea appreciated!!! or Any clarification for that???

gregsgregs
the only way to "turn it off" in production is to redeploy a modified version of the trigger (via ant script or eclipse) that has the active flag set to false.  once this has been successfully redeployed, you can then undeploy thr trigger altogether if you want again via undeploy through an ant script or eclipse
SuzanyuSuzanyu

Thank you for your advice.

I will make bulk process in trigger to avoid limits and get rid of describe call.

One more question. Is there a way to know the personAccount feature has been turned on for an org. I mean a system flag to indicate this.  

Thanks