Announcement

Collapse
No announcement yet.

Disable the email CC and BCC field search?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Disable the email CC and BCC field search?

    The BCC and CC field has a built-in search as you enter the address in the box. You end up having to choose one of the entries... like Mary Smith xxx@yyyy.com. Often I don't want a name with the email address... just the email address alone. Is there any way to disable the search in the BCC field as well as the CC field?

  • #2
    Hello,
    in Email entityDefs these fields have "view": "views/email/fields/email-address-varchar"


    set in custom/Espo/Custom/Resources/metadata/entityDefs/Email.json
    {
    "fields": {
    "cc": {
    "view": "custom:views/email/fields/email-address-varchar"
    },
    "bcc": {
    "view": "custom:views/email/fields/email-address-varchar"
    }
    }
    }

    create this view in

    client/custom/src/views/email/fields/email-address-varchar.js

    And define this view.
    The easiest way is set in view "views/fields/varchar", but you will have no validation

    Comment


    • #3
      Tanya, I'm totally confused. The custom/Espo/Custom/Resources/metadata/entityDefs folder does not have an Email.json file... only an Account.json and Lead.json. Do you want me to create a new file called Email.json and put the code above in it?

      The client/custom directory is empty so I don't understand what you mean by client/custom/src/views/email/fields/email-address-varchar.js

      You seem to say there is a easier way?


      And define this view.
      The easiest way is set in view "views/fields/varchar", but you will have no validation
      If you just explain it a bit I can pop in the code... just not sure where. Also would this be update-proof or would it get wiped out at next update?

      Thanks. I just need a little extra guidance and I can do this.


      Comment


      • #4
        I share with you a wrong link, sorry. https://www.espocrm.com/documentatio.../custom-views/
        - Do you want me to create a new file called Email.json and put the code above in it?
        - yes

        If you don't need validation and want the easiest way for now:
        1) Create a file Email.json in custom/Espo/Custom/Resources/metadata/entityDefs (yes, if file doesn't exist, you have to create it) with the content
        Code:
        {
          "fields": {
            "cc": {
              "view": "custom:views/email/fields/email-address-varchar"
            },
            "bcc": {
              "view": "custom:views/email/fields/email-address-varchar"
            }
          }
        }
        }
        2) create a file client/custom/src/views/email/fields/email-address-varchar.js (if you don't have these folders, create them. case-sensitive) with the content

        Espo.define('custom:views/email/fields/email-address-varchar', 'views/fields/varchar', function (Dep) {

        return Dep.extend({
        });
        });

        3) administration > rebuild. Clear local cache. refresh the page

        This way is upgrade safe

        Comment


        • #5
          I did exactly as you said (I'm a pretty good programmer) and I'm still getting the dropdown menu which I don't want. If I don't select something in the CC or BCC dropdown, it still defaults to an email of an account or a lead.

          See picture. "Joe Test" is a test account on the system and the only one with that email. I don't want BCC or CC email addresses to be associated with any name.

          Is there some way to disable the selection dropdown and just accept any email in the BCC and CC field. I don't need validation.








          Comment


          • #6
            Pictures weren't loaded. Seams js was cached.

            Comment


            • #7
              I'm still getting the drop-down selection, which I don't want.

              Click image for larger version

Name:	Screen Shot 2018-03-19 at 7.06.52 AM.png
Views:	530
Size:	25.6 KB
ID:	35862

              I don't mind checking for a valid email format but it is not necessary. If BCC and CC will take any input I enter that will be fine.

              Comment


              • #8
                Could you open data/cache/application/metadata.php
                Find bbc field with "view" ("entityDefs" => "Email" => "fields" => "bcc" => "view"). What view is here?

                Comment


                • #9
                  Originally posted by tanya View Post
                  Could you open data/cache/application/metadata.php
                  Find bbc field with "view" ("entityDefs" => "Email" => "fields" => "bcc" => "view"). What view is here?
                  Code:
                  'cc' =>
                          array (
                            'type' => 'varchar',
                            'notStorable' => true,
                            'view' => 'views/email/fields/email-address-varchar',
                          ),
                  
                   'bcc' =>
                          array (
                            'type' => 'varchar',
                            'notStorable' => true,
                            'view' => 'views/email/fields/email-address-varchar',
                          ),

                  Comment


                  • #10
                    seams custom/Espo/Custom/Resources/metadata/entityDefs/Email.json is not valid. remove '}',
                    rebuilt again, clear local and browser cache

                    Comment


                    • #11
                      Originally posted by tanya View Post
                      seams custom/Espo/Custom/Resources/metadata/entityDefs/Email.json is not valid. remove '}',
                      rebuilt again, clear local and browser cache
                      You mean remove (i.e. rename) the file? You had me create it earlier.

                      I did what you said... renamed the file... did the rebuild and cleared both caches. I still get the dropdown:

                      Click image for larger version  Name:	Screen Shot 2018-03-20 at 6.48.35 AM.png Views:	1 Size:	25.4 KB ID:	35934
                      Last edited by dev77; 03-20-2018, 01:51 PM.

                      Comment


                      • #12
                        Originally posted by tanya View Post
                        I share with you a wrong link, sorry. https://www.espocrm.com/documentatio.../custom-views/

                        1) Create a file Email.json in custom/Espo/Custom/Resources/metadata/entityDefs (yes, if file doesn't exist, you have to create it) with the content
                        Code:
                        {
                        "fields": {
                        "cc": {
                        "view": "custom:views/email/fields/email-address-varchar"
                        },
                        "bcc": {be cached,
                        "view": "custom:views/email/fields/email-address-varchar"
                        }
                        }
                        }
                        }
                        there are 4 '{' and 5 '}'. Remove one '}' from the end.
                        After rebuild in data/cache/application/metadata.php 'cc' and 'bcc' have to be

                        Code:
                         
                         'cc' =>         array (           'type' => 'varchar',           'notStorable' => true,           'view' => 'custom:views/email/fields/email-address-varchar',         ),   'bcc' =>         array (           'type' => 'varchar',           'notStorable' => true,           'view' => 'custom:views/email/fields/email-address-varchar',         ),
                        Even now js could be cached, so clear local and browser cache...

                        Comment


                        • #13
                          IT WORKS! I no longer get the drop-down menu for CC and BCC. I think the key was removing the final "}" from the Email.json file.

                          THANK YOU for all your help on this. We have officially 'dumped' SuiteCRM and are using Espo in production mode now. After all these years with a constantly 'broken" and very slow SuiteCRM it is so nice to have a CRM where everything works and which is so fast. (Of course our database is only about 500 account and leads!)

                          I hope all of these changes are 'update' safe!

                          Tanya, you are the best!

                          Comment

                          Working...
                          X