cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Is there an API to update WTUser fullName values?

emanarello
3-Newcomer

Is there an API to update WTUser fullName values?

I need to modify our WTUsers fullName values.

Is there an API that updates fullName?

Thanks

3 REPLIES 3

I think, you can try PersistableAdapter (or depricated LWCNormalizedObject )

PersistableAdapter PObj = new PersistableAdapter(WTUser,null,null,null);

PObj.load("fullName");

Object AttrValue=PObj.get("fullName");

attrs.put("fullName", "_newUserFullName_");

Setting WTUser attributes is a protected action so I believe you will at least need to be an Org Admin. Renat Shaimardanov's suggestion should work just fine or even something like the following will work.

WTUser user = getUser("userName");

user.setFullName("New Name");

PersistenceHelper.manager.save(user);

Thank you both for your suggestions!

They both worked, but I marked Christopher's answer as correct because of its simplicity. The PersistenceHelper did the trick!

Again, thanks a bunch for getting me unstuck

Eileen

Announcements

Top Tags