Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betobaz/587662ead1fdf5d5dad4 to your computer and use it in GitHub Desktop.
Save betobaz/587662ead1fdf5d5dad4 to your computer and use it in GitHub Desktop.
SugarCRM: Sidecar: Open create-actions layout in a drawer on demand
({
events:{
'click button': '_handlerClick',
},
_handlerClick: function(evt, el){
var modelPrefil = app.data.createBean("Accounts");
modelPrefil.set({
name: "Account name",
assigned_user_name: 1
});
self.drawer = app.drawer.open({
layout: "create-actions",
context:{
create: true,
model: modelPrefil
}
}, function(){
console.log("After save", arguments);
});
app.once("app:view:change", function(name, attributes){
console.log('After drawer display');
});
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment