Error when create Case from Email

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LuckyLouie
    Senior Member
    • Nov 2017
    • 172

    Error when create Case from Email

    Hello,
    After updating Espocrm from version 7.3 to 7.5.6, when trying to create a Case from e-mail, I receive the following error:
    Error 403: Access denied
    Can't relate with forbidden Email record. edit access required.​

    Thank you for all your help.
  • lazovic
    Super Moderator
    • Jan 2022
    • 809

    #2
    Hi LuckyLouie,

    Please check whether the user who is experiencing the error has access to edit emails.

    Comment

    • LuckyLouie
      Senior Member
      • Nov 2017
      • 172

      #3
      Hello lazovic
      The roles look like in the attached screen.

      I don't understand why if a user sees a message in their mailbox they can't create a Case from it like it did until version 7.3?

      If I change the role access to edit emails =all , the user will see all emails, including other users', and this is unacceptable.
      Attached Files

      Comment

      • LuckyLouie
        Senior Member
        • Nov 2017
        • 172

        #4
        ​Interestingly, even if I add an email address as another address in the user's preferences, the user still cannot create a Case.
        Click image for larger version

Name:	obraz.png
Views:	163
Size:	12.3 KB
ID:	97180
        Attached Files

        Comment

        • lazovic
          Super Moderator
          • Jan 2022
          • 809

          #5
          LuckyLouie,

          I tested the creation of a Case from an email using the same access settings for the user, and everything worked.
          Are you sure that this email is assigned to the team the user is in? This is a very strange situation. Try to reproduce this error with a different email.

          Comment

          • LuckyLouie
            Senior Member
            • Nov 2017
            • 172

            #6
            Step to reproduce:
            The user has a personal email account: main@domain.com
            Other email aliases are also redirected to the main@domain.com alias, e.g. aa@domain.com and bb@domain.com.

            The user sees all e-mails in his mailbox that were sent to both main@domain.com and aa@domain.com and bb@domain.com.

            The User can create a Case only from the email sent to main@domain.com,
            The user cannot create a Case from emails that were directed to aa@domain.com and bb@domain.com even if I add these addresses in the user preferences​.

            Comment

            • LuckyLouie
              Senior Member
              • Nov 2017
              • 172

              #7
              Originally posted by lazovic
              LuckyLouie,

              I tested the creation of a Case from an email using the same access settings for the user, and everything worked.
              Are you sure that this email is assigned to the team the user is in? This is a very strange situation. Try to reproduce this error with a different email.
              Emial does not have any team assigned, but the user can see it because he received it in his personal mailbox. Until version 7.3, a user could create a case from such an email, now he cannot.

              Comment

              • LuckyLouie
                Senior Member
                • Nov 2017
                • 172

                #8
                lazovic Could you help? We have been using EspoCRM since version 5.6 and after so many years, work for us is completely blocked

                Comment

                • lazovic
                  Super Moderator
                  • Jan 2022
                  • 809

                  #9
                  LuckyLouie,

                  I don't really understand how aliases worked for you in this situation and, to be honest, I would not work in this way in EspoCRM, because the alias system was never configured here.

                  The user has access to those emails that are fetched in his Personal Email Account in the instance, and this is how it has always worked. Also, the user can have access to emails that are associated with the team in which the user is a member. In almost all other cases, an access conflict will occur.

                  Comment

                  • LuckyLouie
                    Senior Member
                    • Nov 2017
                    • 172

                    #10
                    lazovic
                    What is the 'Email' option in user preferences for? Previously, if a user alias other than the main one was added here, the user could edit the e-mail sent to this e-mail address.​

                    Click image for larger version

Name:	obraz.png
Views:	197
Size:	49.5 KB
ID:	97239

                    Comment

                    • lazovic
                      Super Moderator
                      • Jan 2022
                      • 809

                      #11
                      LuckyLouie,

                      I recommend that you carefully read the following section in the documentation about working with Personal Email Accounts, where you will also find the answer about the Email field: https://docs.espocrm.com/administrat...email-accounts.

                      Comment

                      • LuckyLouie
                        Senior Member
                        • Nov 2017
                        • 172

                        #12
                        yuri
                        Is there any way to have the option to create a Case from the email that the user sees (which he received on his personal email account but to an address other than the main one), as it worked before?
                        from version 5.6 to version 7.x it worked great. Now it prevents us from working. There is still a downgrade, but it is a waste of a number of options such as api before script, etc.​

                        Comment

                        • yuri
                          Member
                          • Mar 2014
                          • 8440

                          #13
                          Create a file custom/Espo/Custom/Resources/metadata/recordDefs/Case.json

                          Code:
                          {
                              "relationships": {
                                  "emails": {
                                      "linkRequiredForeignAccess": "read"
                                  }
                              }
                          }
                          Then, clear cache.
                          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


                          • yuri
                            yuri commented
                            Editing a comment
                            As the error message states, a user does not have "edit" access to the email. If you give "edit" access to the user in roles, this functionality should work (without customization).
                        • LuckyLouie
                          Senior Member
                          • Nov 2017
                          • 172

                          #14
                          Yuri thank you so much! We can get back to work again! Again thank you very much!

                          Comment

                          Working...