Hi!
I'm trying to implement a custom button with action on it (as entryPoint)
The code in detail.js:
The button in in place, but when its clicked i see the following string in adress bar: domain.com/crm/#?entryPoint=StyleExpertCertificatePDF&id=adjksand kjasnkjdas
but entryPoint code is not called at all.
In case i manually remove the hash sign from the URL: domain.com/crm/?entryPoint=... The entyPoint code is get called and everything is fine.
I think there is something wrong with .navigate method or slim framework ? Could you please help.
I'm trying to implement a custom button with action on it (as entryPoint)
The code in detail.js:
Code:
Espo.define('custom:views/style-expert-certificate/detail', 'views/detail', function (Dep) { return Dep.extend({ setup: function () { Dep.prototype.setup.call(this); this.menu.buttons.push({ name: 'printPDFCertificate', label: 'Print PDF Certificate', action: 'printPDFCertificate', acl: 'view' }); }, actionPrintPDFCertificate: function () { this.notify('Loading...'); var url_base = this.getBasePath(); var url_param = '?entryPoint=StyleExpertCertificatePDF&id=' + this.model.id; //this.getRouter().navigate( url_base + url_param, {trigger : true} ); window.location = url_base + url_param; } }); });
but entryPoint code is not called at all.
In case i manually remove the hash sign from the URL: domain.com/crm/?entryPoint=... The entyPoint code is get called and everything is fine.
I think there is something wrong with .navigate method or slim framework ? Could you please help.
Comment