I want to disable edit button and inline edit for records based on status value. how to do that??
Ex: i dont want give an edit option for status closed records. I have tried with this code but it is disabled Edit button only.
how to restrict from inline edit also.
Need help as soon as possible....
- $dependencies['<module>']['<unique name>'] = array(
- 'hooks' => array("edit"),
- //Optional, the trigger for the dependency. Defaults to 'true'.
- 'trigger' => 'true',
- 'triggerFields' => array('status'), //dropdown field name
- 'onload' => true,
- //Actions is a list of actions to fire when the trigger is true
- 'actions' => array(
- 'name' => 'ReadOnly',
- //The parameters passed in will depend on the action type set in 'name'
- 'params' => array(
- 'target' => 'edit_button', //edit button name
- //id of the label to add the required symbol to
- 'label' => 'LBL_EDIT_BUTTON_LABEL',
- //Set required if the status is closed
- 'value' => 'equal($status, "Closed")' // base on selected value button will be ReadOnly
- //Actions fire if the trigger is false. Optional.
- 'notActions' => array(),