Announcement

Collapse
No announcement yet.

New Email and Phone Fields

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

  • New Email and Phone Fields

    Hi Team,

    We are creating new email and phone fields in Account entity by going into the account.json file and adding the following code and then rebuilding the system

    "emailAddress": { "type": "email", "isPersonalData": true },
    "phoneNumber": { "type": "phone", "typeList": ["Mobile", "Office", "Home", "Fax", "Other"], "defaultType": "Mobile", "isPersonalData": true },

    this does bring up the entry in layout manager but when we try to save any value there it stays there till we are in the account entity but if we refresh the page or go to another entity and come back to account entity it disappears. Also if we go and make any modifications to the field from the espocrm backend in the JSON file it adds a value to the field notStorable: true.

    We even removed that entry and rebuild the solution the data is still not stored. Can someone guide us on this?

  • #2
    Do we need to create something in the Database too for these fields to get stored in the database, as we are defining them in the JSON file? Or create a relationship with the email entity?
    Last edited by bhavikin; 05-26-2022, 03:29 PM.

    Comment


    • #3
      It's not possible to create another email address and phone number field.

      You can create another entity (of person type) and link this entity with account through one-to-one relationship.

      Comment


      • #4
        If that is not possible can I create a varchar field and do validations for email and phone number? Can you help me in how to add formulas to fields on how to do validations for email and phone? I think we would need to use regular expressions for that? I can create two fields one for phone number and one for email all I need is to use formulas to do validation on them. any pointers here would be highly appreciated.
        Last edited by bhavikin; 05-26-2022, 04:41 PM.

        Comment


      • #5
        Dynamic logic allows to have a regular expression that determines whether a field value is valid. https://docs.espocrm.com/administration/dynamic-logic/

        Comment

        Working...
        X