var editor; BX.ready(function() { editor = BX.CrmProductEditor.create(); } function tpl_changecurency(idCur) { console.log(editor); }