Workflow Form Fields Not Populating After Selecting Identity in QuickLink Workflow

Which IIQ version are you inquiring about?

8.4

Share all details about your problem, including any error messages you may have received.

When an Identity is selected from the dropdown, its corresponding attributes like Department, Mobile Number should automatically populate into read-only fields. The Identity dropdown loads correctly, but after selecting an identity, the dependent fields are not getting populated.

Please share any other relevant files that may be required (for example, logs).

can you share the workflow code.
or validate from your end, did you mention by rule to fetch the values in the form.
for the mentions attributes.

usually in the form.
with the type settings you should configure it. to pass/show the required information in the read only mode.

Hi @trevortrevor
can you please share your code

<Field displayName="Identity" dynamic="true" name="identityName" type="sailpoint.object.Identity"/>
          <Field displayName="Department" dynamic="true" name="oldDepartment"  type="string">
            <Attributes>
              <Map>
                <entry key="readOnly" value="true"/>
              </Map>
            </Attributes>
            <Script>
              <Source> import sailpoint.object.Identity;

                if(IdentityName != null){
                Identity id = context.getObjectByName(Identity.class, identityName);
                if(id != null){
                
                return id.getAttribute("department");
                }}
              </Source>
            </Script>
          </Field>
          <Field displayName="mobile" dynamic="true" name="oldMobile"  type="string">
            <Attributes>
              <Map>
                <entry key="readOnly" value="true"/>
              </Map>
            </Attributes>
            <Script>
              <Source> import sailpoint.object.Identity;
                if(IdentityName != null){
                Identity id = context.getObjectByName(Identity.class, identityName);
                if(id != null){
               
                return id.getAttribute("mobile");
                }}
              </Source>
            </Script>
          </Field>
          <Field displayName="email" dynamic="true" name="oldEmail"  type="string">
            <Attributes>
              <Map>
                <entry key="readOnly" value="true"/>
              </Map>
            </Attributes>
            <Script>
              <Source> import sailpoint.object.Identity;
                if(IdentityName != null){
                Identity id = context.getObjectByName(Identity.class, identityName);
                if(id != null){
       
                return id.getAttribute("email");
                }}
              </Source>
            </Script>
          </Field>

The fields are not populating because the form is not refreshing after selecting the Identity.

In QuickLink workflow forms, dynamic fields update only when a postback happens.

Please add postBack="true" to the Identity field.

<Field displayName="Identity"
       name="identityName"
       type="sailpoint.object.Identity"
       dynamic="true"
       postBack="true"/>
1 Like

Dear @trevortrevor ,

I have modify the code which worked at setup.
where I was the field.setValue.

try this at your end and let me know, whether that’s working for your.

<Field displayName="Identity" dynamic="true" name="identityName" type="sailpoint.object.Identity"/>
          <Field displayName="Department" dynamic="true" name="oldDepartment"  type="string">
            <Attributes>
              <Map>
                <entry key="readOnly" value="true"/>
              </Map>
            </Attributes>
            <Script>
              <Source> import sailpoint.object.Identity;

                if(IdentityName != null){
                Identity id = context.getObjectByName(Identity.class, identityName);
                if(id != null){
                
                
	field.setValue(department);
        return false;
                }}
              </Source>
            </Script>
          </Field>
          <Field displayName="mobile" dynamic="true" name="oldMobile"  type="string">
            <Attributes>
              <Map>
                <entry key="readOnly" value="true"/>
              </Map>
            </Attributes>
            <Script>
              <Source> import sailpoint.object.Identity;
                if(IdentityName != null){
                Identity id = context.getObjectByName(Identity.class, identityName);
                if(id != null){
               
                
	field.setValue(mobile);
        return false;
                }}
              </Source>
            </Script>
          </Field>
          <Field displayName="email" dynamic="true" name="oldEmail"  type="string">
            <Attributes>
              <Map>
                <entry key="readOnly" value="true"/>
              </Map>
            </Attributes>
            <Script>
              <Source> import sailpoint.object.Identity;
                if(IdentityName != null){
                Identity id = context.getObjectByName(Identity.class, identityName);
                if(id != null){
       

	field.setValue(email);
        return false;
                }}
              </Source>
            </Script>
          </Field>
1 Like

try adding logs inside the script to verify whether values are being fetched correctly after selecting the Identity.

I tried using the above code, but I still no luck.

Since the field type is sailpoint.object.Identity, it returns the Identity ID, not the name so use context.getObjectById(Identity.class, identityName) instead of getObjectByName(). Also ensure postBack="true" is enabled on the Identity field.

2 Likes