Which IIQ version are you inquiring about?
8.5p1
Share all details about your problem, including any error messages you may have received.
I have created an update provisioning policy form for one of the applications, I have a few fields that i want to be hidden based on the entitlement that was requested from Access Request. I have tried using the Rule option in the Type settings → Hidden but that gives me below error, I have tried putting this in the value settings → Value Rule but it doesn’t actually hide the field, my understanding is that i need to set the dynamic as true to make sure the rule is executed and it hides the field, but as soon as i set dynamic to true, it gives me the same error as below.
Caused by: org.apache.bsf.BSFException: BeanShell script error: bsh.EvalError: Sourced file: inline evaluation of: import sailpoint.object.ProvisioningPlan.AttributeRequest; import sailpoint.tool . . . '' : Attempt to resolve method: toXml() on undefined variable or class name: accountRequest : at Line: 6 : in file: inline evaluation of: import sailpoint.object.ProvisioningPlan.AttributeRequest; import sailpoint.tool . . . '' : accountRequest .toXml ( )
BSF info: script at line: 0 column: columnNo
Below is the piece of code I’m using for hiding the field
import sailpoint.object.ProvisioningPlan.AttributeRequest;
import sailpoint.tools.Util;
import sailpoint.object.ManagedAttribute;
import sailpoint.object.Filter;
System.out.println("accountRequest in modify form --- "+accountRequest.toXml());
String returnValue = "";
for(AttributeRequest attReq : accountRequest.getAttributeRequests()){
if("roles".equalsIgnoreCase(attReq.getName()) && attReq.getValue() != null){
Filter searchFilter = Filter.and(Filter.eq("application.name", accountRequest.getApplication()), Filter.eq("value", attReq.getValue()));
ManagedAttribute ma = context.getUniqueObject(ManagedAttribute.class, searchFilter);
if(ma != null && ma.getAttribute("vf_ma_group_sub_type") != null){
if("Standard".equalsIgnoreCase(ma.getAttribute("vf_ma_group_sub_type"))){
returnValue = "true";
field.setRequired(false);
field.setHidden(true);
}
}
}
}
System.out.println("returning from hidden value rule -- "+returnValue);
return returnValue;