Script for keeping note of employee leaves
Requirement:
Employees must be able to initiate a leave request while viewing their available leave days.
UseCase:
The HR department must review all requesters' outstanding leave days and leave requests before approving the leave request.
Two user defined additional fields have to be added to all requesters, one to keep track of their eligible leave count and the other to keep track of their compensation off count.
Steps to Configure:
- Create two numeric user additional field to hold the count of eligible leaves for every user. Populate this with the desired count for each employee.
- Create a new field to store the type of leave. In our example, we have compensatory off and eligible leave.
- Create an extra field to hold the number of working days for which the employee intends to apply for leave.
- Create a new leave request template and include these newly created field to indicate the type of leave and number of leaves.
- Configure Approvals in the request template workflow.
- Goto Admin > Developer Space > Global Function > Copy & Paste the attached GF_4 - Configuration.txt and save it with a name.
- Goto Admin > Developer Space > Request Custom Function > Copy & paste PTO_COMP_leave.txt and save it with a name.
- Update the global function count according to your instance. In my case it's global_function_4().
- Configure a custom trigger to get invoke this custom function script on request approval.
New to ADSelfService Plus?
Related Articles
Close the request upon adding a note.
Kindly follow the steps mentioned below: 1) Go to Admin >> Developer Space >> Custom Function >> Global Functions >> Copy & Paste the attached GF_Content.txt and save it with a name. Update the URL and technician key as per your instance. Refer to ...
Script to Update date/time additional field inside request when note is added.
(Applicable for builds 14300 & above) Please follow the below mentioned steps to configure: First Download and extract the attached zip file containing the scripts & attachments (screenshots) 1.Goto Admin > Developer space --> Custom Functions > ...
Script to Auto share request
1. Download MSP_share_Request.zip from the attachment, extract it, and paste the same under ManageEngine\ServiceDesk Plus MSP\integrations\Custom_scripts. # auto_share_MSP.py # functions.py # configuration.json 2. ...
Script to automatically populate the "Line Manager" role based on the Change Requester
"When a Change Request is created, the Line Manager role will automatically be assigned to the user specified in the 'Reporting to' field of the particular Change Requester. Tested in builds: 14300 and 14303. Download the scripts attached. Global ...
Script to find the actual SLA of an Incident
Use case When an incident is logged, the timer for the SLA is started. However, the actual incident might have occurred hours before the incident creation. In order to find the actual time of SLA, we can use a python script. Pre-requisite Python ...