Розширення панелі інструментів форми
Actions Visibility
It is possible to control visibility of available actions on the forms
(document, task) via action_isVisible or action_isVisible_<actionCode>
handlers that must return an appropriate boolean value.
If any document attribute used in the visibility condition changes, this will cause the action button to be hidden/showed respectively.
Basic usage:
module.exports = {
// Control several actions in one handler
action_isVisible(event) {
switch (event.actionCode) {
case 'action1':
return event.document.getAttribute('someBooleanAttr1')
case 'action2':
return event.document.getAttribute('someTextAttr') === 'some text value'
}
// If no return value any other actions considered visible by default
},
// Control the specific action
action_isVisible_action3(event) {
return event.document.getAttribute('someBooleanAttr3')
}
}