Workflow - Can't refer to "assigned user"-fields of Quote-Module

Hello,

i have an issue while creating a new workflow that refers to the “assigned user”- field of the Quote-Module.
In a workflow, i want to be able to access the e.g. telephone number of the assigned user in the quote-module.

For example:
I have a quote / offer, that is assigned to a certain user of the system.
That user ofc has a defined name, last name, phone number, etc.
Now i want to create a workflow, that triggers on a edited quote-dataset, what i mean by that is i want to trigger the workflow whenever a new quote / offer is edited / saved.
In that workflow i want to be able to access the telephone number of the assigned user, so i can fill a certain custom field that i created in the quote-module.

I tried to define all kinds of different relationships (1:1, 1:m, m:n) between the “user” and “quote” - module, but when i go back to the workflow module, all i see are those relationsships:
user : user
user : user
user : user
…

but, all i want to achieve is this relation:
quote : assigned to user

I’m using SuiteCRM Version 7.10.7
Sugar Version 6.5.25 (Build 344)

I hope someone can replicate this and help me figure out what’s the problem here.
I checked out the change logs, but this issue is not adressed there.
I don’t know what i’m doing wrong here, if anything.
If there is something unclear, please dont hesitate and post here, i will try to answer asap.
Thanks.

I suggest doing it with two Workflows:

First, create a custom field in the Quote to hold the telephone number.

  • one Workflow merely prepares the telephone number so it is ready, in the Quotes record (not in a related record). So, whenever the assigned user changes, you copy the phone number into that new custom field.

  • the second workflow does whatever you meant to do initially, but taking advantage of the fact that the field you need is already there.

I’m not sure this scheme can work, it’s just an idea I had, you will have to try it.

1 Like

First of all thanks for your quick reply and your suggestion pgr.

i solved a lot of issues already with the way you described your approach.
I think i didn’t explain the issue in this case thoroughly enough tho, so give me another shot at it:

What i want:
1.) Workflow checks what user is assigned to the quote.
2.) Workflow looks for the telephone number of the assigned user and grabs it’s value.
3.) Workflow adds/sets the telephone number into a custom field in the quote.
4.) I want to trigger that specific workflow when a quote-dataset is edited/saved.

What im struggling with:
1.) Can’t define a working relationship between user and quote module to access the telephone number of the assigned user of a quote.

Doesn’t sound like magic to me either, i did more complicated things already, but when it comes to defining that specific relation, i’m getting stuck and stuck again. My workflow is just not able to access the fields of the assigned user.

My workaround so far (ugly solution):
When i choose the “user-module” while creating a new workflow, i’m indeed able to access the telephone-number of the assigned user of a quote and set it’s value to the custom field inside the quote.
Sounds perfect right? No, since for the change to apply to the custom fields inside the quote, i first need to go inside the list view of my CRM-users, open up a user-dataset (edit) and save it again - that triggers my workflow to fill my custom fields inside the quote.

I want to trigger the workflow to fill in the telephone number when a quote-dataset is edited/saved, not when a user-dataset is edited/saved.

Thanks,

Harald.

When you reach these sorts of limits of the Workflow mechanism, it’s usually wiser to just change strategy and write a Logic Hook. Do you know PHP, or do you have someone in your company who does?

https://docs.suitecrm.com/developer/logic-hooks/