You need to sign in to do that
Don't have an account?
VeevaEms
Trigger on UserTerritory?
I'd like to write a trigger on UserTerritory so that when Territory assignments change I can update a custom field on the User object with the assigned territory.
Can't seem to write triggers on the UserTerritory object.
Workaround is batch apex to update all users on some regular schedule, but I'd really like a better solution.
Any suggestions?
You can't trigger on that today, so you'd have to use your batch Apex Code suggestion, or you could use some Visualforce code to perform updates when using the UI, but that's unreliable (won't work on API updates, for example). Unfortunately, that's all we can offer right now.