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

user email update
I am trying to update a few records with email id whenever a user updates his email in the user record. I wrote the trigger on User object however the trigger is not firing since an email is first sent over on email update which then requires confirmation from user.
Any ideas on what can be done?
Any ideas on what can be done?
Instead of writing the trigger on User object, I moved my trigger to the custom object in which the email needs to be updated. Works like a charm!
All Answers
https://help.salesforce.com/apex/HTViewSolution?urlname=How-can-I-disable-email-address-change-verification-for-my-org-1327108328107&language=en_US
Maybe you can create a new field for email and if you add the email there too. Then it will trigger the operation.
I dont think there will be a direct solution but this workaround can work as you have very less users who will use it.
Mark it as solved if it resolves the issue.
Thanks
However, there would be one challenge to update this field at the same time to change the email address/recieve confirmation from user to change the email address.
Thanks for your suggestion. But I do not think this is a viable solution because there is a slightest chance that the email change is not confirmed by the end user. In which case all my records will have the new email address however the actual user record will have the old email address.
I am specifically looking for the event on which I can make my trigger fire. I am trying to understand what happens when the end user confirms the email address change via mail? The user record gets updated however the after update trigger is not firing. Why is it so? Very confusing
Trigger do not fire when email confirmation link is clicked. Here is a Idea and you can vote on it (I have voted for you) - https://success.salesforce.com/ideaView?id=08730000000kyTtAAI
For workaround, you need to store the new email somewhere and write a schedule job. Which will check the new email and old email. When user clicks on email confirmation and after that scheduled job will run and make the required changes. Maybe you can add the email on event record and run some scheduled jobs. There is no direct solution.
Thanks,
Rahul
Instead of writing the trigger on User object, I moved my trigger to the custom object in which the email needs to be updated. Works like a charm!