Dear comunnity, im trying to create a form for update identity but its failing
my intention is update the lastname of an identity
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Form PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Form created="1698325712438" id="c0a8b28f8b6b1b5a818b6c19ce360081" modified="1698325774473" name="Edit-Identity-Form-Base" type="UpdateIdentity">
<Attributes>
<Map>
<entry key="pageTitle" value="Edit-Identity-Form-Base"/>
</Map>
</Attributes>
<Description></Description>
<Section name="Section 1">
<Field displayName="label_name" displayOnly="true" name="name" type="string">
<Attributes>
<Map>
<entry key="hidden">
<value>
<Script>
<Source>
import sailpoint.tools.Util;
import sailpoint.object.Identity;
if(Util.isNullOrEmpty(value)) {
Identity cube = context.getObjectById(Identity.class, identityId);
if(cube != null) {
field.setValue(cube.getName());
}
}
return false;
</Source>
</Script>
</value>
</entry>
</Map>
</Attributes>
</Field>
<Field displayName="Display Name" name="displayName" type="string">
<Attributes>
<Map>
<entry key="hidden">
<value>
<Script>
<Source>
import sailpoint.tools.Util;
import sailpoint.object.Filter;
import sailpoint.object.Identity;
import sailpoint.object.QueryOptions;
String middleName = form.getField("middleName").getValue();
String displayNameNew = firstname + " " + lastname;
if(Util.isNullOrEmpty(lastname) || Util.isNullOrEmpty(firstname)) {
field.setValue("");
return false;
}
if(Util.isNotNullOrEmpty(middleName)) {
displayNameNew = firstname + " " + middleName + " " + lastname;
}
field.setValue(displayNameNew) ;
return false;
</Source>
</Script>
</value>
</entry>
</Map>
</Attributes>
</Field>
<Field displayName="Email Address" dynamic="true" name="email" type="string">
<Attributes>
<Map>
<entry key="hidden">
<value>
<Script>
<Source>
import sailpoint.tools.Util;
if(Util.isNullOrEmpty(email)) {
return true;
}
return false;
</Source>
</Script>
</value>
</entry>
</Map>
</Attributes>
</Field>
<Field displayName="last_name" dynamic="true" name="lastname" type="string"/>
</Section>
</Form>
for instance adam kennedy