You need to sign in to do that
Don't have an account?
Aaron Baugher
How to deal with managed packages in a sandbox?
Hello, I'm very new to Salesforce and Apex (about 2 weeks), so I'm still learning the basics and terminology.
I've been given a sandbox (Developers type, I'm told) and asked to create a batch class to process a large number of records. The problem I'm having is that there are already triggers defined on the object I'm working with, so when I run my batch job, those triggers run into the non-batch limits and cause it to fail. So I'd like to edit or delete those triggers. However, they are part of a managed package that was installed as part of the sandbox, so I can't touch them. I can uninstall the whole managed package, but that would make the sandbox worthless for development, since I need those objects, just not the trigger.
Is there a way around this I'm not seeing, that would allow me to disable or edit a trigger in a managed package in a sandbox? Should I have a different kind of sandbox for this sort of work? Thank you.
I've been given a sandbox (Developers type, I'm told) and asked to create a batch class to process a large number of records. The problem I'm having is that there are already triggers defined on the object I'm working with, so when I run my batch job, those triggers run into the non-batch limits and cause it to fail. So I'd like to edit or delete those triggers. However, they are part of a managed package that was installed as part of the sandbox, so I can't touch them. I can uninstall the whole managed package, but that would make the sandbox worthless for development, since I need those objects, just not the trigger.
Is there a way around this I'm not seeing, that would allow me to disable or edit a trigger in a managed package in a sandbox? Should I have a different kind of sandbox for this sort of work? Thank you.
https://help.salesforce.com/articleView?id=sharing_apps.htm&type=5
And It's not possible to edit the code of a managed package. If you click on "edit", you gonna see an empty file.
I hope the above information helps you.
All Answers
You cannot create managed packages from a sandbox. Generally, the sandbox organization is configured to create unmanaged packages only. Unmanaged packages are not upgradeable. You need to signup for Developer Edition to create a managed package.
You can migrate all your code from sandbox to developer edition using Force.com IDE or Migration tool. etc
To know more about packaging concepts, go through:
http://wiki.developerforce.com/page/An_Introduction_to_Packaging
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.
I'll look into migrating to a developer edition. Maybe that would work better for what I'm trying to do. Thank you.
https://help.salesforce.com/articleView?id=sharing_apps.htm&type=5
And It's not possible to edit the code of a managed package. If you click on "edit", you gonna see an empty file.
I hope the above information helps you.
Any triggers invoked during a batch process are restricted to the batch limits, not the non-batch ones. What matters is the context of the request, not the fact that it's a trigger. Also, if this batch update that's going to run in your production org at some point your code will have to cooperate with the managed trigger anyway.
You may just need to reduce the number of records you process at a time in the batch process. When you cause it to execute, try specifying a smaller number of records:
Database.executeBatch( new myBatchClass(), 50); // (the "50" is the number of records per batch. the default is 200, I believe)
If that doesn't work, you'll have to contact your package maintainer and explain your difficulties to them and get advice on how to circumvent their issue or maybe get a patch from them that fixes it.