Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
I need to modify our WTUsers fullName values.
Is there an API that updates fullName?
Thanks
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