Change Account not Refreshing?

0
On my account entity I have a String attribute 'MiddleName' which a user has permission to change on their own account. However, I'm running into some interesting behavior. Say I'm currently logged in and my MiddleName is 'John'. If I change the MiddleName to 'Adam' and save the record, I check the DB and I see 'Adam'. However, when I view the page to validate my change, it still displays 'John'. I've tried retrieving my account from the DB, and passing that account to the form, but I still see 'John'. If I logout and log back in, I then see 'Adam'. If I login as a system administrator and change any user's middle name, I get the proper functionality. I've tried stripping the page down so it has just the single field on it, with no conditional visibility, no events, and full read/write access on Accounts, but I'm not able to find a way to display the proper value without logging out. Is there a way to get this to work?
asked
2 answers
1

What I recently noticed is that the currentUser object doesn't get updated.

In the microflow to find your user, are you using the currentUser token and casting it before showing it in the page? When I am using the currentUser variable in microflow I am currently always seeing the values as they were at login, no matter what or how I change this in the application.

The alternative for me was to retrieve the user from the database with xpath constraint [id = $currentUser]

answered
0

When you commit the Account, do you refresh in client? If so, depending on your page setup, you could try the Java action RefreshObjectByClass from the CommunityCommons module.

answered