The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
Hi Dax,
you can use this code to do anything in Windchill as any user:
try{
SessionContext previous_context = SessionContext.newContext();
SessionMgr.setPrincipal(creator.getName()); // for example... You can use any user
// Your code that needs to be executed as another user...
} catch(Exception e) {
e.printStackTrace();
} finally {
if (previous_context != null) {
SessionContext.setContext(previous_context);
}
}
Iker Mendiola
Prambanan IT Services
http://en.prambanan-it.com
Iker Mendiola - Prambanan IT Services |
Iker Mendiola - Prambanan IT Services |