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
Emmanuel B.Emmanuel B. 

Communities Email update does'nt run triggers nor workflows

Hi all,

I want to update the contact's mail address when the user changes its mail address in Communities.
I have written a trigger but it's not triggered when only the email is changed, probably because the change requires a confirmation (by mail) andis then made via the setup/emailverif page who, I guess, must call special methods, or maybe run with a guest user without any right ?

I have tried to trigger a workflow as well, but same : if I modify the email address from the setup/user interface in salesforce, the workflow (and trigger) is run, but if I modify via Communities -> /setup/emailverif, nothing happens.

Any idea how to fix it, or even to debug it (no debug is available for the emailverif call, maybe because it's run with a guest user I can't add to the usres watched)

Thanks for any answer
ShashForceShashForce
Hi,

There is a workaround for this. Please check if it works for you. Create a workflow rule which fires always, every time user record is edited, and add a field update to the workflow which does a dummy update on any field on the user record. This will fire the trigger.

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
Emmanuel B.Emmanuel B.
Hi,

unfortunately I already tried that, and that's how I found that even the workflow isn't fired.

Thanks anyway for your answer.

Emmanuel