AnsweredAssumed Answered

how do I get curren user id in contacts module record.js?

Question asked by Nick Gamora on Aug 19, 2016
Latest reply on Aug 19, 2016 by Alan Apter

({
    extendsFrom: 'RecordView',   
    zipJSON: {},

    initialize: function (options) {
        app.view.invokeParent(this, {type: 'view', name: 'record', method: 'initialize', args:[options]});

 

    //var userID = app.user.id;
    //console.log('userId='+userID);
        this.context.on('button:create_data_po:click', this.create_data_po, this);   

    },

 

    create_data_po: function() {
    var ContID = this.model.get('id');
        $('a[name=create_data_po]').attr('target', '_blank');
    $('a[name=create_data_po]').attr('href', 'https://www.******?id='+ContID+'&salesman='+userID);
    window.open($('a[name=create_data_po]').attr('href'));
    }, 
})

Outcomes