+ Start a Discussion
Nitin SharmaNitin Sharma 

Can a field be updated on Account object using territory assignment rules? 


Scenario: I need to update some field based on territory assigned an account. I have written a Trigger on after update but it didn’t work as nothing is updated on the account so my trigger didn't work.
 
Raj VakatiRaj Vakati
Hi  Nitin ,

You can able to do it . But good if you can share the code to find the issue and let me know what field  you wanted to update 

 
Nitin SharmaNitin Sharma
But how can a field update on account after territory assignment. Any idea..?
Nitin SharmaNitin Sharma
Hello , The actual problem is not with trigger, My trigger is working fine if territory is assigned and i manually update any other field on account. I have written a after update trigger, but problem is nothing is update on account after territory assignment so my trigger didn't call automatically. So wanted to know if there is any other object which gets update when territory is assigned so that I can call my trigger from there. Thanks, Nitin
Dr SalesforceDr Salesforce
Hi Guys,

i am working on something similar:
E.g - Assume we a Territory called - "Varun's Territory" and the user assigned to that territory is "Varun Vyas" and there are 100 accounts assigned to it by some assignment rule. Also, assume we have a field on Account called "User assigned to Territory"(could be lookup to user or could be just a text field). So, is there a way by which we can update this field's value to "Varun Vyas" for his 100 accounts (this needs to be automated without using data loader)?

Can you please share Trigger code for reference?

Much appriciated,
Varun