on 08-19-2015 12:48 PM
Hi ,
We are in sourcing 10.0.
Need help on piece of code to achieve one requirement.
I am trying to fetch group bean but no luck!! here is my code ,,
I have logged it I am not getting any value in groupBean.
if(collaboratorType.equals("group"))
collabGroupMemObj= collaboratorMember.getPrincipal();
mchl_LogIt("Principal:"+collabGroupMemObj.getDisplayName());// VALUE : collaboratorMember:Principal: XYZ, Role: Collaborator, Source: USER(showing in logs)
groupHome=IBeanHomeLocator.lookup(session, com.sap.odp.api.usermgmt.masterdata.GroupIBeanHomeIfc.sHOME_NAME);
groupBean = groupHome.find(collabGroupMemObj);
mchl_LogIt("groupBean:"+groupBean);///// NOT DISPLAYING ANY VALUE
Can anybody help me on this where I am wrong.
Thanks in Advance.
Regards, Geetika
Hello Geetika,
Give a try for below and check
import com.sap.odp.api.usermgmt.masterdata.GroupIBeanHomeIfc;
import com.sap.odp.api.usermgmt.masterdata.GroupIBeanHomeIfc;
import com.sap.odp.api.ibean.IBeanHomeLocator;
collabs = doc.getCollaborators();
collabsItr = collabs.iterator();
while(collabsItr.hasNext()){
collabsItrMem = collabsItr.next();
if(collabsItrMem.getCollaboratorType().hashCode() ==2){
groupHome=IBeanHomeLocator.lookup(session,GroupIBeanHomeIfc.sHOME_NAME);
groupBean = groupHome.find(collabsItrMem.getPrincipal());
throw new ApplicationException("groupBean " +groupBean);
}
}
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.