Portal Read-only fields do not update the attribute in IDM

book

Article ID: 209389

calendar_today

Updated On:

Products

CA Identity Suite

Issue/Introduction

We need to have a field marked in Portal as Read Only so users cannot modify, but we are dynamically updating that field using Portal Form Handlers.   When set to read only a field is not passed back into the corresponding attribute in IDM. 

For Example of a Create User form in the Portal:

First Name (Read/Write)
Last Name (Read/Write)
UserID (ReadOnly)  

The User Admin enters the First Name and Last Name in the form and the UserID is dynamically generated from the first and last name to conform with company policies, using form handlers.   


The problem is that if the UserID field is marked as read-only it will not be sent to the Identity Manager. 

Cause

The design philosophy of the Portal and IDM is that a read-only field is exactly that, for display only and should not be updated, therefore marking a field on a form in Portal to read-only results in that field being omitted from the update back into Identity Manager.

Environment

Release : 14.3

Component : CA IDENTITY SUITE (VIRTUAL APPLIANCE)

Resolution

As an alternative to achieve the same functionality you can programmatically set the field(s) that should be Read Only (but being updated by form handler logic) as NOT being Read Only, i.e. the "Read only" check-box is NOT checked.

Then in those fields "Init handlers" use the following code line to set the field to programmactially set  Read only:

 prop.readOnly = true;

 

The result is that the field becomes Read Only for the end users, but the Portal itself does not see the field as read only and will include this field in the update back into Identity Manager.