Retreiving the parent id in compose.js

Hi All

        How can we retrieve the parent id in initialize function of  the compose.js file in Email subpanel of Cases module.

I  have copied compose.js to  /<>/custom/modules/Emails/clients/base/views/compose.js and used

        console.log('parent id '+this.model.parent_id);

But this doesnt work.Can any one please help me. Prashant Patel Shijin Krishna

Regards

Sidhu

  • Hi Sidhu,

    I played with compose.js a bit and i was able to get the related beans with following code;

    ({
        extendsFrom: 'RecordView',
    
    
        initialize: function(options) {
            this._super('initialize', [options]);
            var prepopulate = this.context.get("prepopulate");
            console.log("related", prepopulate.related);
            console.log("related ID", prepopulate.related.get("id"));
            console.log("related Module", prepopulate.related.get("_module"));
        },
    })
    

    Let me know if this helps.

    Regards

    Tevfik Tümer

    Developer Support Engineer