FieldContext function example to initialize a profile screen attribute.

book

Article ID: 50939

calendar_today

Updated On:

Products

DIRECTORY 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 SECURITY MISC CODES SINGLE SIGN ON - LEGACY CA Data Protection (DataMinder) CA User Activity Reporting

Issue/Introduction

Description:

Here is an example of how to initialize a profile screen attribute of a task. This refers specifically to the text area on a profile screen where you have to insert a function of the form: function init (FieldContext).

Solution:

In this example, we want to populate the manager field on the profile screen with the administrator's (person running the modify user task) last name. Here is how we would use the init function to accomplish this:

   function init(FieldContext)   
   {   
   var adminDN=FieldContext.getAdministrator().getUniqueName();   
   var up = FieldContext.getUserProvider();   
   var curAdmin=up.findUser(adminDN,null);   
   FieldContext.setValue(curAdmin.getAttribute("eTLastName"));   
   }  

Environment

Release:
Component: IDMGR