Hello,
I have an entity and I wanted to add a field of type "phone" to it. Everything works on the front-end. I can type the phone number into the field and when I save the entity it shows 'success' on the front-end and displays the phone number. For some reason, it isn't saving it on the backend.
Refreshing the page shows that the field is empty again and it isn't storing it in the phone_number table in the database either. I seem to have had this issue before but I can't remember how I fixed it. Yes, I have cleared the cache and rebuilt after adding this field to my entity.
I could have sworn that the way I fixed this some time ago was by 'naming' the field 'phoneNumber' but I can't do that here because I need two different fields of type 'phone'.
I've added the field to myEntity.json as shown below (Using Espo 7.2.7)
/Custom/Resources/metadata/EntityDefs/MyEntity.json
I have an entity and I wanted to add a field of type "phone" to it. Everything works on the front-end. I can type the phone number into the field and when I save the entity it shows 'success' on the front-end and displays the phone number. For some reason, it isn't saving it on the backend.
Refreshing the page shows that the field is empty again and it isn't storing it in the phone_number table in the database either. I seem to have had this issue before but I can't remember how I fixed it. Yes, I have cleared the cache and rebuilt after adding this field to my entity.
I could have sworn that the way I fixed this some time ago was by 'naming' the field 'phoneNumber' but I can't do that here because I need two different fields of type 'phone'.
I've added the field to myEntity.json as shown below (Using Espo 7.2.7)
/Custom/Resources/metadata/EntityDefs/MyEntity.json
Code:
{ "fields": { ..., "shippingAddressPhone": { "isCustom": true, "type": "phone", "required": false, "typeList": [ "Office" ], "defaultType": "Office" } } }
Comment