Skip to Content
0
Former Member
May 26, 2016 at 12:37 PM

Original user unable to login into CLM when delegation is set for the user who is inactive or Enable user to login button is unchecked.

72 Views

Hi,

The original user is unable to login into CLM when a delegation is set for the user who is inactive or Enable user to login button is unchecked. For testing I created a delegation in which user is inactive and login checkbox is unchecked. So, each time I am unable to login (as I am the original user here). I have made changes in the script because manually it is not possible to internally set the login functionality. Need help in fixing the logging functionality of original user even if delegated user is inactive or with login flag disabled.

currentUser = session.getAccount().getAccountObjectReference();
usrIbean = IBeanHomeLocator.lookup(session, currentUser).find(currentUser);

delegateUserObjRef = doc.getExtensionField("Z_DELEG_APPR").get();
delegateUserHome = IBeanHomeLocator.lookup(session, delegateUserObjRef);
delegateUserBean = delegateUserHome.find(delegateUserObjRef);

bloginEnabled = delegateUserBean.getFieldMetadata("CAN_LOGIN").get(delegateUserBean);

var=delegateUserBean.isInactive();
if(bloginEnabled ==false || var==true )
{
usrIbean.getFieldMetaData("CAN_LOGIN").set(TRUE);
}

-Avneet