How Hide Cancel option in HR case form for particular HR services(Only for case created by user)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2023 12:20 PM
How Hide Cancel option in HR case form for particular HR services(Only for case created by user)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2023 12:37 PM - edited ‎10-13-2023 12:37 PM
Hi Kalpana,
Follow below steps.
1. Create a property in the sys_properties table as below
2. Create Script include as below
var hideCancelUIAction = Class.create();
hideCancelUIAction.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
hidecancel: function(servicesis)
{
var getservices=gs.getProperty('sn_hr_core.hr_services_ui_action');
if(getservices.indexOf(servicesis)>-1)
{
return true;
}
else{
return false;
}
},
type: 'hideCancelUIAction'
});
3. Update the Cancel button on HR Case table to use Condition
gs.getUserID()==current.opened_by && new sn_hr_core.hideCancelUIAction().hidecancel(current.hr_service);
All, that is needed is the step 1 i.e. property to pass comma separated values for HR Services for which you want to show Cancel UI action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2023 12:46 PM
Hi Jaspal,
Thank you
3rd point script where i need to update. did not get it

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2023 12:50 PM
It is mentioned, you need to Update the 'Cancel' button condition field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2023 01:10 PM
Hi Jaspal,
There is already a condition available in condition hence I tried to add our condition with && but there is not enough space to put our condition.
How can i add it