Hi,
We are trying to create a dashlet to pre-fill contact fields with data from an external source.
This works for first name, last name, phone, etc, but for Email, it does not work properly.
It works when I go to the create view, refresh the page (press f5) and run the following script attached to a button. But the UI does not update the email field when I do not refresh (f5) the page after entering the create view...
When inspecting the objects in memory, I can see that the email address is being added and when saving the record, the email address is getting saved.
this.model.set("first_name", firstName);
let emailArray = [];
emailArray.push({
email_address: email,
primary_address: true,
opt_out: app.config.newEmailAddressesOptedOut || false
});
this.model.set("email", emailArray);
When looking at the documentation at, I would say this is supposed to work. I have no intention of adding email adresses, therefore I do not deepCopy the array. Even when deepCopying the array, it still does not work.
support.sugarcrm.com/.../
I am running on-premise version 13.0.3
Any idea how to solve this issue?
Regards,
Stijn