I want to add assigned user field in projects and be able to setup a workflow to send an email to the assigned user. I was able to add the field via a json file but assigned user does not work in the email template or email workflow. Does anybody know how to get this to work?
Add assigned user field in project
Collapse
X
-
Tags: None
-
Current Tasks:
1: I added JSON code to /Custom/Resources/metadata/entityDefs/Project.json and /Custom/Resources/i18n/en_US/Project.json to enable assigned users for Projects. So far, assigning users is now possible, but currently the part I'm stuck on is trying to enable sending emails to assigned users. For some reason, the option "Related: Assigned Users" in the "To" dropdown when editing the Send Email action is missing, and nothing I do seems to solve the problem.
What I tried doing:
- I mentioned adding JSON code to two different files both called Project.json which do different things. The code I added was supposed to add an "assignedUser" option when selecting a recipient in the "send email" action
- I also tried to make a new "relationships" directory in the metadata folder which should have defined a links between different entities, in this specific case, project and assigned users, but Espo seems to be ignoring this folder for some reason.
* Assigned Users is now a usable field within Project's entity settings, but it still will not appear as an options when sending emails -
Current Tasks:
1: I added JSON code to /Custom/Resources/metadata/entityDefs/Project.json and /Custom/Resources/i18n/en_US/Project.json to enable assigned users for Projects. So far, assigning users is now possible, but currently the part I'm stuck on is trying to enable sending emails to assigned users. For some reason, the option "Related: Assigned Users" in the "To" dropdown when editing the Send Email action is missing, and nothing I do seems to solve the problem.
What I tried doing:
- I mentioned adding JSON code to two different files both called Project.json which do different things. The code I added was supposed to add an "assignedUser" option when selecting a recipient in the "send email" action
- I also tried to make a new "relationships" directory in the metadata folder which should have defined a links between different entities, in this specific case, project and assigned users, but Espo seems to be ignoring this folder for some reason.
* Assigned Users is now a usable field within Project's entity settings, but it still will not appear as an options when sending emails
Hi man, could you share the exact content of those files? I want to implement the same (enable assigned users for projects) and am a little stuck.
Thanks a lot!
Comment
-
It's been a while since we last looked at this so I'm not too certain if this will help or if it is missing details. Make a back up just in case.
To fix this, I believe we ended up making a custom json file in /var/www/espocrm/data/espocrm/custom/Espo/Custom/Resources/metadata/relationships called projectAssignedUser.json and added the following code:
HTML Code:{ "type": "belongsTo", "key": "assignedUser", "name": "projectAssignedUser", "entity1": "Project", "entity2": "User", "foreignKey": "assignedUserId" }
HTML Code:{ "fields": { "assignedUser": { "type": "link", "entity": "User", "relationType": "belongsTo", "audited": true, "required": true }, "assignedUserId": { "disabled": true }, ... }, "links": { "assignedUser": { "type": "belongsTo", "entity": "User", "foreignKey": "assignedUserId", "layoutDetail": true, "layoutEdit": true }, }
-
-
I don't recommend to add Assigned Users to Project manually. It's not officially supported, there will be multiple problems with it. We won't be able to provide support for such customizations.
It's possible to enable collaborators per project.
The Project entity type differs from regular entity types in Espo. We have very different granular access control per Project which we don't have for regular entities. The multiple assigned users field won't work here. There are also other features that will fail to work.Last edited by yuri; 09-10-2025, 04:24 PM.If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.Comment
Comment