Default End Date in Out of Office Assistant Task
search cancel

Default End Date in Out of Office Assistant Task

book

Article ID: 14792

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Governance CA Identity Portal CA Risk Analytics CA Secure Cloud SaaS - Arcot A-OK (WebFort) CLOUDMINDER ADVANCED AUTHENTICATION CA Secure Cloud SaaS - Advanced Authentication CA Secure Cloud SaaS - Identity Management CA Secure Cloud SaaS - Single Sign On

Issue/Introduction

We are using the Out Of the Box functionality for Out Of Office, by use of Out Of Office Assistant Task where the initiator searches for some user whom he/she wants to put as his/her assistant during absence.



Is there a way we put some default end date in this task when a user does not specify anything as end date.

Environment

Release:
Component: IDMGR

Resolution

Write a BLTH javascript for the "Out Of Office Assistant" task (Profile tab). 

Here is my sample setting the enddate as the current date + 7 days: 

 

function handleSetSubject(BlthContext, errorMessage) { 

importPackage(Packages.com.netegrity.ims.tabhandlers) ; 

importClass(Packages.java.util.Vector) ; 

importClass(Packages.java.util.Calendar) ; 

 

var vTabHandlers = BlthContext.getTaskTabHandlers() ; 

 

if (vTabHandlers != null) { 

for ( i = vTabHandlers.elements(); i.hasMoreElements();) { 

var e = i.nextElement() ; 

var cal = Calendar.getInstance(); 

cal.add(Calendar.DATE, 7); 

e.setEndDate(cal.getTime()); 

return true;