AnsweredAssumed Answered

Dropdown loss its options once "app.drawer.open" close

Question asked by Aravind Kumar on Jan 11, 2017
Latest reply on Feb 22, 2017 by Aravind Kumar

I am working with notes and cases module.

 

I have customized "creat-note" button to case record view. I am succesfull when to open the notes create popup. But when I finish creating the notes. The existing selection which i did in the dropdown is getting refershed. How can i over come it.

 

createNote: function () {
var name = singularModuleName + ' Update';
var state_transition_c = this.model.get('state_transition_c');

if (this.isEscalated) {
name = 'Escalation Update';
}

var notesBean = {
'name': name
}
, notesModel = app.data.createBean('Notes', notesBean)
, self = this;

var nonPortalFlagModules = ['Plans'];
if (this.isEscalated) {
notesModel.set('portal_flag', 0);
notesModel.set('internal_c', 1);
} else if ($.inArray(moduleName, nonPortalFlagModules) == -1) {
notesModel.set('portal_flag', 1);

notesModel.set('type_c', 'Incident');
}
}

app.drawer.open({
layout: 'create',
context: {
create: true,
module: 'Notes',
model: notesModel
}
}, function(notesModel) {
console.log('Closing Notes');
if (!notesModel) {
return;
}
setTimeout(function(){
self._render();
}, 2000);
});
console.log(state_transition_c);
this.model.set(state_transition_c',state_transition_c);
},

 

I loss all my options in the dropdown. My dropdown is a multienum.My dropdown name is "state_transition_c"  Any help. Thanks.

Outcomes