AnsweredAssumed Answered

Loading Lead on drawer

Question asked by Bruce Park on Nov 24, 2017

Hi,

 

I'm trying to load one of existing Leads on drawer.

So currently loading Lead was successful but the other records on subpanels keeps loading and nothing appeared.

 

How can I do it?

 

FYI, the code I used is below.

var parent_type = this.model.get('parent_type');
var parent_id = this.model.get('parent_id');

var lead_bean = app.data.createBean(parent_type, {id: parent_id});
lead_bean.fetch({
    success: function (data) {
        console.log(data);
        app.drawer.open({
            layout: 'record',
            context: {
                module: parent_type,
                model: data
            }
        }, function () {
            alert('Drawer closed.');
        });
    },
    error: function () {
        console.log('bbb');
    }
});

Outcomes