Open ziaulhuda opened 13 years ago
Can you give me some code to reproduce this issue?
Here is the code. just change the conditions to get some contact who have a invalid email address attached to it
sc_contacts = @sugarcrm::Contact.find(:all, :conditions=>{:date_modified=>">= '#{last_r.gmtime.strftime("%Y-%m-%d %H:%M:%S")}'"})
sc_contacts.each do|contact| contact.contacts_sys_cleverreachid_c = new_id contact.save end
It will change the invalid email to valid email. contacts_sys_cleverreachid_c is a user defined field. You may use any other field for updating
Whoa... This is a SugarCRM bug. I can confirm this because if you enable debugging on the connection and call save! on the record, you don't see any values passed for the email address.
To reproduce:
a = SugarCRM::User.find(id)
Save the record
a.save!
set_entry request does not pass any parameters except id:
set_entry: Request: { "session": "be3da93ff2c9ecef99fb5123cb47a0e3", "module_name": "Contacts", "name_value_list": {"id":{"name":"id","value":"a3d2b5ca-5126-5953-8422-4dc0d2392dcf"}} }
set_entry: JSON Response: {"id"=>"a3d2b5ca-5126-5953-8422-4dc0d2392dcf"}
Hi,
I have a contact which have an invalid and a valid email address. When I change a value of an attribute of that contact and call save function, the new value of changed attribute is stored which is good but the problem is the invalid email address is changed automatically to valid email.
Is this a problem of gem or api?
Waiting for response