Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save betobaz/8903da727396b6a346ce to your computer and use it in GitHub Desktop.
Save betobaz/8903da727396b6a346ce to your computer and use it in GitHub Desktop.
SugarCRM: Sidecar: save new bean with id
({
events:{
'click .button': '_createMeeting',
},
_createMeeting: function(){
var meeting = app.data.createBean('Meetings');
meeting.set({
// Create its UUID
id: app.utils.generateUUID(),
name: 'Test',
date_start: '2015-09-15'+'T09:00:00',
duration_minutes: 30,
duration_hours: 0,
parent_type: 'Accounts',
parent_id: '387643b8-626b-2a7c-86ff-55a5f9c3b44e',
parent_name: 'Acount test'
});
// Force to save with POST
meeting.id=null;
meeting.save();
}
})
@orlybg
Copy link

orlybg commented May 2, 2016

Para que version de Sugar es este codigo Pedro?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment