cancel
Showing results for 
Search instead for 
Did you mean: 

IAPI to get an external user for supplier contact

katie_doody2
Participant
0 Kudos
150

Hi, I am writing a script to get an existing external user and set them as a contact to a specified supplier. I am looking for an IAPI to give me an external user based on their userid or email. I would then like to take this user and add them as a contact to a supplier. I have tried using the following code:

NewUserAccountIBeanHomeIfc userHome = IBeanHomeLocator.lookup(session, NewUserAccountIBeanHomeIfc.sHOME_NAME);

log.setLogMessage("Get Session Context" + userHome.getSessionContext());

Logger.error(log);

log.setLogMessage("Get Home Done" + userHome);

Logger.error(log);

// create your new user bean

UserAccountIBeanIfc user = userHome.findUniqueByEmail(data.getEmail());

I am not able to pull an external or internal user based on their email. I get a null response. I tried to see what I would get if I displayed the userHome.displayAll() and it looks like this is only pulling the internal accounts. Does someone know how to get an external user?

Thanks,

Katie

Accepted Solutions (0)

Answers (0)