Announcement

Collapse
No announcement yet.

Phone field in custom entity

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

  • Russ
    replied
    Thank you, lazovic

    Leave a comment:


  • lazovic
    commented on 's reply
    If you added a field with the Phone type to a custom entity or some other entity that initially did not have a field with the Phone type when it was created, you will most likely need the following instructions for modifying the EspoCRM code: https://docs.espocrm.com/extensions/...-custom-entity.

  • Russ
    replied
    Hi, added a phone field, but if I am clicking on it, it does not brings up the espo dialer, it offers me to call through my FaceTime instead, what would be the workaround? Thanks

    Leave a comment:


  • Kurt
    replied
    It looks like that might have been it -- when I use emailAddress and phoneNumber as the names it works fine. I'll work around this with labels, but it does appear you can only have a single email or phone field on an entity because of this. That won't get in my way but might be worth improving.

    Leave a comment:


  • Kurt
    replied
    I'm also trying this and running into a little trouble. I have defined two new fields on my custom entity and manually changed the type in the JSON file:

    "leadDeliveryPhone": {
    "type": "phone",
    "typeList": ["Mobile", "Office", "Home", "Fax", "Other"],
    "defaultType": "Mobile",
    "required": false
    },
    "leadDeliveryEmail": {
    "type": "email",
    "required": false
    }

    The UI renders the fields properly but when I try to submit an edit nothing gets saved on the back end and there are no errors. No data has been put in entity_phone_number for this entity. Is it perhaps required that I call the fields emailAddress and phoneNumber for this to work correctly?

    Leave a comment:


  • khopper
    commented on 's reply
    I did the rebuild and restarted apache. I also had to remove the email field had originally created before finding this post.

  • tanya
    replied
    The path of your file? Is json valid? Did you Rebuild EspoCRM in Administration?

    Leave a comment:


  • khopper
    replied
    I'm trying to do this with Opportunity, I Inserted the code the json file in the custom folder accordingly but the email field is not working.
    I have cleared the backend cache, my local cache and restarted apache just to make sure to no avail. Not sure what I am missing.

    "emailAddress": { "type": "email" },
    Last edited by khopper; 12-15-2017, 04:27 AM.

    Leave a comment:


  • thanassos
    replied
    Yay works perfectly thanks

    Leave a comment:


  • tanya
    replied
    /custom/Espo/Custom/Resources/metadata/entityDefs/Site.json

    Leave a comment:


  • thanassos
    replied
    Here? httpdocs/custom/Espo/Custom/Resources/metadata/clientDefs/site.json (My entity is called Site)

    Edit : My bad here : httpdocs/custom/Espo/Custom/Resources/metadata/entityDefs/site.json

    Leave a comment:


  • tanya
    replied
    Do not copy all the file, because it contains own relations

    Leave a comment:


  • tanya
    replied
    Just copy this
    Code:
            "emailAddress": {
                "type": "email"
            },
            "phoneNumber": {
                "type": "phone",
                "typeList": ["Office", "Mobile", "Fax", "Other"],
                "defaultType": "Office"
            },

    Leave a comment:


  • thanassos
    replied
    Thank for your answer.
    Noob here, I juste need to Duplicate the Account.json and rename it by the name of my entity?

    Leave a comment:


  • tanya
    replied
    Hello
    If you create entity with type Company or Person - these fields are included.
    These fields are not available for creation in Entity Manager.
    You can do it only manually.
    use application/Espo/Modules/Crm/Resources/metadata/entityDefs/Account.json (or Contact.json) as example

    Leave a comment:

Working...
X