+ Start a Discussion
Ed HalldaEd Hallda 

enterprise territory management - unable to load provided apex for opportunity assignment due to low code coverage


I'm attempting to implement Automatic Opportunity Territory Assignment from page 21 of the Enterprise Territory Management Implementation Guide which tells me to install the following Apex:


Two issues:

1. The Guide and the Help file fail to mention that you need to install in Sandbox and move as a Change Set to production.  I can't do this because I do not have the required Code Coverage.  How do I get the required Code Coverage?

2. We are new to SFDC Enterprise.  If SF is telling their customers to install their Apex to make one of their features work, why don't they just install the Apex themselves?  Unless I'm missing something completely, I would think this would affect a great many people.

Thanks for any guidance!

Alex SelwynAlex Selwyn
1) The guide provides a sample implementation. You can either use as is or do more customization with it, in either case, you have to create the code in a sandbox first. I am stating the obvious, you have to write a test class to get the required code coverage.

2) That's a broad question, in the current context, this is an advanced feature. In some advanced territory management cases, the Account gets tangled in multiple territories, this is a way to assign one specific territory to an opportunity, through customized logic.

If possible post your use case, we can see if this feature is needed for your solution.