You need to sign in to do that
Don't have an account?

Apex triggers and Territories
I have some Territory Assignment rules based on Account fields that are filled in by a trigger execution. The problem is that the assignment rules never apply in that way, but if the field is modified through Salesforce interface they are applied. I know that there is a SOAP header I have to use when inserting Accounts through API Web services in order to get assignment rules executed, but what about that in Apex?
I haven't found any reference that states that Apex doesn't trigger Territory Assignment rules, but my tests lead me to think so, and it is a very big problem in our org.
Thanks,
Andrew
the right territory. When user changes Country in Account Site it gets updated in Account (the trigger fires correctly), but the Territory in the Account has not been assigned. If I log in as an admin user and click Edit button and then Save without changing anything, the territory is now selected based on new Country.
I am having the same problem. In the sandbox works OK, but when I passed to production it does not work.
Did you find a workaround to this issue?
Best regards and thanks in advance for any comment about it.
Thanks for the quick response.
Actually, my problem is in the Convert Lead operation. In the convert lead I map a field from the lead to the Account, and I have Territory Account assignment rules based on that field.
And even thought the field is mapped ok, the rule does not run.
Best regards.-