salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.52k stars 2.09k forks source link

Unable to change email1 field via API #10513

Open JackBuchanan opened 2 months ago

JackBuchanan commented 2 months ago

Issue

When creating a record with an email1 field(Contacts/accounts etc) you are able to pass in the email1 field into the body to set the email:

POST: /Api/V8/module BODY: { "data": { "type": "Contacts", "attributes": { "first_name": "Bob", "last_name": "Dylan", "email1": "freewheelin@mail.com" } } }

This successfully creates the contact with the email1 populated.

When attempting the same call with a PATCH request to update the email1 field the other fields are updated but email1 is not changed.

Possible Fix

No response

Steps to Reproduce the Issue

1. Setup V8 API
2. Make API request with contents as described above
3. See record created after POST
4. See record email1 stay unchanged after PATCH request

Context

No response

Version

7.14.4

What browser are you currently using?

Chrome

Browser Version

No response

Environment Information

MySQL, PHP8.2

Operating System and Version

Ubuntu 22

johnM2401 commented 2 months ago

Hey @JackBuchanan! Thanks for raising this, with a fix. For reference, duplicate issues: https://github.com/salesagility/SuiteCRM/issues/9960 / https://github.com/salesagility/SuiteCRM/issues/8293

Thanks!