when a user receive e-mail with CC, he can't edit teams and parent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nsns
    Junior Member
    • Jun 2019
    • 20

    when a user receive e-mail with CC, he can't edit teams and parent

    When a user receive e-mail and is in CC then he can't edit this e-mail. For example he can't change the team or Parent.
    Can i use any formula in email entity to resolve this?
  • victor
    Active Community Member
    • Aug 2022
    • 727

    #2
    Originally posted by nsns
    When a user receive e-mail and is in CC then he can't edit this e-mail. For example he can't change the team or Parent.
    Can i use any formula in email entity to resolve this?
    Hi nsns,

    1. This User must have edit permission for team (screenshot 1).
    2. In Administration > Entity Manager > Email > Before Save Custom Script > Formula add the following formula:
    Code:
    // email addresses IDs
    $userA = 'user-A-email-address-ID';
    $userB = 'user-B-email-address-ID';
    $userC = 'user-C-email-address-ID';
    
    // team ID with access to edit email
    $teamId = 'team-ID';
    
    if (
       array\includes(ccEmailAddressesIds, $userA) ||
       array\includes(ccEmailAddressesIds, $userB) ||
       array\includes(ccEmailAddressesIds, $userC)
       ) {
       entity\addLinkMultipleId('teams', $teamId)
    }

    - Id of a specific team can be taken in Administration > Teams > your_team_name​ (screenshot 2).
    - Id of a specific email address can be taken in Administration > Email Addresses > your_email_address (screenshot 3).​
    Attached Files
    Last edited by victor; 02-14-2024, 02:21 PM.

    Comment

    • nsns
      Junior Member
      • Jun 2019
      • 20

      #3
      Thanks.
      But with this solution the e-mail will be visible to all the users that are in the team ID with access to edit email.
      I think that this will be another problem.
      Again thanks for your help.

      Comment

      • yuri
        Member
        • Mar 2014
        • 8438

        #4
        There's 'assignedUsers' field in Emails. I think if a user is added to it, they will be able to edit.
        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

        Working...