Hello Folks,
I have find out a big problem with sugarcrm.
I have created the custom popup for Accounts module by following Adding a new popup view in Sugar 7.x Record View « Sugar Developer Blog – SugarCRM and it is working fine.
Now Suppose I have Industry field on the model popup. So I have used the code
this.model.set('industry'.'value');
this.model.save();
and industry field is updated with the value that I have been set on the model.
BUT
if you open the model and then open the same record into next tab and change the Name field on the record to suppose 'XYZ' . Now go back to previous tab and apply the changes on the model to set the Industry field.
This should and suppose to just update Industry field but it update the name field with the previous one. It revert the name field as well.
This means this.model.save(); not just update the fields which we set using this.model.set(); it updates all the fields. full bean.
I have tried to save like below
this.model.save({industry:'value'});
but it is having the same effect. it update the full bean.
As of Backbone.js v0.9.9, you can simply pass { patch: true }
to save()
.
I have tried the same but it seems like sugar has not implemented patch.
- create → POST /collection
- read → GET /collection[/id]
- update → PUT /collection/id
- patch → PATCH /collection/id
- delete → DELETE /collection/id