on 2016 Dec 06 7:23 PM
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
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.