jkabot
02/11/2019, 5:50 PMMark Nelson
02/11/2019, 6:39 PMjkabot
02/11/2019, 6:52 PMMark Nelson
02/11/2019, 6:53 PMjkabot
02/11/2019, 6:55 PMfunction beforeLoad(ctx) {
ctx.form.addButton(...)
}
My approach in this case would be to check the customer on the order in the user event, and only add the button if it's customer I want
function beforeLoad(ctx) {
var customer = ctx.newRecord.getValue({ fieldId: 'entity' });
if (customer !== customerThatGetsTheButton) {
return;
}
ctx.form.addButton(...);Mark Nelson
02/11/2019, 6:57 PMjkabot
02/11/2019, 6:57 PM