Problem / Question on Workflow Module with changing contacts dataset

Hi there

i’m trying to change the assigned user of a contact to the assigned user of the related account.

What i did:

  1. Create a workflow on the contactmodul
  2. Create a condtion: account - assigned user does not equal contact assigned user
  3. Created an action: change dataset: contact modul, assigned_user, field; assigend_user

The Problem: in Step 3 the last field of assigned_user refers to the assigend_user of the contact module an i cannot select it from the list.

Is this a normal behavior or a bug. Currently on 7.10.4, PHP7

If some can provide a database script, that assigns all contacts of an account to the assigend user of the account this is also an option :slight_smile: :wink:

Thank you for any hint.

Best T.

The fast and best option is to use before save hook in the contact record. You can check the assigned user there and can simply assign it the account assigned user ID in case it is different from the current assigned user of current contact.


I can tell you the steps if you are interested to implement this hooks strategy.



thank you for the answer. It think that could be a way, but it may not be update safe.

The easiet way for me seems to run a db-script peridically which checks about a contact being different to the account and change them.

Best T.

I am sorry but this approach will update the records very slow. And if you run the db-script in the short intervals it will increase server load which results decrease in server performance.
What will happen, when you have thousand of Contacts, and you are checking them after 10 minutes even…
And what if you process the current record now and the script update it later.

Well, i think if we do it via hook, we only affect the contacts that will be touched from the users. If we do it via db-script once a day in the middle of the night, the load will not be the problem. Also day by day the number of contacts reduce, so the impact on the preformance not that much.

But anyway, is the way with the hook update safe and is it possible to do the change for all contact records.

Hooks are update safe.
Don’t worry.
They are in custom Folder.
It is up-to you. If you prefer script. That is also OK.


i think then i could be both.

The script for running on time and the hook for new an updated records.

If you can help or support us in this case, we would appreciate this.

Best T.

Yes sure.
Please add me SKYPE (sohaib.majeed44)