This topic contains 10 replies, has 8 voices, and was last updated by Mike Kudelya 7 years, 4 months ago.
- Topic
Hi,
I try to use the REST API to create new contacts. I manage to create new contacts if there are only basics content like FirstName, LastName, jobTitle, etc however I have an issue when I try to add an email:
– The field ’email’ seems to be not allowed, I get error sayingThis form should not contain extra fields: \"email\"
– Using the field ’emails’ has no effect. No email is created if I send the following json string{"contact":{"firstName":"Sylvain","lastName":"Ray\u00e9","source":"vcard","emails":{"email":"slyatremoveddiglin.com","primary":true}}}
Well after some research, I see that the entity Contact is associated to ContactEmail for the property “emails”. In the API Controller, there is no call to the Contact entity method “addEmail” as it is done to appendAccount.
Do you plan something about that or if I provide a fix, do you think I’m in the good direction by adding to the API Rest controller ContactController and in the ContactHandler a logic to add Emails?
Thank you for your feedback.
The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.