function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Udaya BhaskarUdaya Bhaskar 

Issue with Territory Assignment Rules

Hi All,

We are facing a strange issue with Territory assignment rules.

we have set up territory assignment rules based onthe fields Marketing Domain and sales office which are available on Account object. the rules are working fine when i create a account directly in sfdc and edit & save the account on salesforce page.

When i create an account through Client Program, it is not working. we tried setting the territory id through assignment rule header through java program. we are encountering an error like Default cannot be null.
Please help us on this.


String assign_id = "04T20000000CcVl";

ID assign = new ID(assign_id);

_AssignmentRuleHeader arh = new _AssignmentRuleHeader();


bindingIM.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(),"AssignmentRuleHeader",arh)