Get data from a Drawer

If I have something like this in my record.js, the module is Notes

app.drawer.open({
     layout: 'create',
     context: {
          create: true,
          module: linkModule,
          recParentModel: parentModel,
          model: prefill,
          recLink: link,
          recContext: this.context,
          recView: this.view
                              }
     }, _.bind(function (model) {
          //get data from model here
        }

is there a way to get the savd note ID and DESCRIPTION from 'model'?  I have tried everything I know and I cant seem to get back to the record that was created from the opened drawer.

Parents Reply Children
  • Not sure what you mean "without the bind function"

    console.log(model) gives me

    {}
    _changing: false
    _events: Object {  }
    _fetchCalled: false
    _pending: false
    _previousAttributes: Object { create: true, module: "Notes", recParentModel: "Cases",}
    attributes: Object { create: true, module: "Notes", recParentModel: "Cases",}
    changed: Object {  }
    children: Array(11) [ {}, {}, {},]
    cid: "c4701"
    id: "c4701"
    lastSaveAction: null
    parent: Object { cid: "c4", _changing: false, _pending: false,}
    <prototype>: Object { initialize: initialize(), clear: clear(), resetLoadFlag: resetLoadFlag(),}
    components_01edb5a18fd2135ec72fb29083f1cb9b.js:5032:7