Hi All,
How to remove list View Edit Button Based On Condition..?sugarcrm expert sugar developers
Hi All,
How to remove list View Edit Button Based On Condition..?sugarcrm expert sugar developers
You can not, conditionally, remove a button from rowactions, but instead you can disable it.
Save the attached js file into custom/clients/base/fields/sticky-rowaction-deactivable/
Inside the recordlist of a give module modify the definitions of the target button at the rowactions attribute:
array(
'type' => 'sticky-rowaction-deactivable',
'name' => 'edit_button',
'label' => 'LBL_EDIT_BUTTON',
'event' => 'list:editrow:fire',
'acl_action' => 'edit',
'deactivable' => array(
'triggerFields' => array('status'),
'trigger' => 'or(isInList($status, createList("Closed", "Cancelado", "Pedido nao Postado")), not(isUserInList(createList("SIMM_GER", "SIMM_SUP"))))',
)
),
Remember to run QRR after saving the files.
Regards
@André Lopes
Thanks for quick Replay ...
But i want to remove based on Some condition....