Hi all,
I am trying to Set IIQ disabled to true through rule. I am using the link.setIiqDisabled to make it go red but saving the lonk and identity object is not working. It is still green
Can someone help?
Thanks in advance.
Hi all,
I am trying to Set IIQ disabled to true through rule. I am using the link.setIiqDisabled to make it go red but saving the lonk and identity object is not working. It is still green
Can someone help?
Thanks in advance.
put the commitTransaction at end
add on above solution,
You can use lock and unlock if you are making such change.
Recommendation on context.saveObject or context.commitTransaction - Compass
Lock IdentityIQ objects before modification (code sample) - Compass
Hello @rishavghoshacc,
Instead of setIiqDisabled
, try using the βaLink.setAttribute("IIQDisabled", true);
β
Place context.commitTransaction();
after context.saveObject(identity);
Also tell me,
Let me know these things
Thank You,
Raju
for (String singleIdentity : identitylist)
{
Identity identity = context.getObjectByName(Identity.class, singleIdentity);
List appLinks = identity.getLinks();
if(appLinks!=null)
{
for (Link aLink : appLinks)
{
if(aLink!=null @and aLink.getApplicationName()!=null)
{
if(aLink.getApplicationName().equals(appAccount))
{
aLink.setAttribute("IIQDisabled",true);
context.saveObject(aLink);
context.commitTransaction();
break;
}
}
}
}