I’m trying to build a custom LCM provisioning form in SailPoint IIQ 8.3 to allow users to change their manager. I want the current manager to be pre-selected in the “Change Manager” dropdown when the form loads.
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Form PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Form name="Test_ChangeManager_Form" type="Workflow">
<Section columns="1" label="Change Manager" name="ChangeManagerSection">
<!-- Hidden field to debug 'name' -->
<Field name="name" type="string">
<Attributes>
<Map>
<entry key="visible" value="false"/>
</Map>
</Attributes>
</Field>
<!-- Change Manager field with script to pre-fill -->
<Field displayName="Change Manager" name="NewManager" type="sailpoint.object.Identity">
<Attributes>
<Map>
<entry key="suggest" value="true"/>
<entry key="displayAttribute" value="displayName"/>
<entry key="objectType" value="sailpoint.object.Identity"/>
</Map>
</Attributes>
<Script>
<Source>
import sailpoint.object.Identity;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Log log = LogFactory.getLog("FORM_ChangeManager_Debug");
log.error("==== DEBUG: name = " + name);
try {
if (name != null) {
Identity user = context.getObject(Identity.class, name);
if (user != null) {
Identity manager = user.getManager();
log.error("==== DEBUG: manager = " + (manager != null ? manager.getDisplayName() : "null"));
return manager;
}
}
} catch (Exception e) {
log.error("==== ERROR getting manager: ", e);
}
return null;
</Source>
</Script>
</Field>
</Section>
<Button action="back" label="Cancel"/>
<Button action="next" label="Submit"/>
</Form>
I confirmed that:
- The
name
variable (Identity name) is available in the form context. - The user has a valid manager with a displayName.
- Logging shows the script returns the manager object correctly.
Still, the dropdown is not showing the pre-filled value.