Ui Builder Cannot set property of null

Hi backendless team,

New to backendless, Codeless and Java.
Busy building a new app, after user registration I would like the user to update user profile (few more properties). Getting the following error:
Cannot set property ‘aboutme’ of null - (aboutme is a column in users table)
define([], () => ({
/* content /
handler:onClick */
async onClick(___arguments) {
var aboutme, user;

user = (await Backendless.UserService.getCurrentUser());
aboutme = (___arguments.context.pageData[‘aboutme’]);
if (aboutme) {
user[‘aboutme’] = aboutme;
await Backendless.UserService.update( new Backendless.User(user) );

/* handler:onClick /
content */
How do I correct this?

Thank you

Hi @Eugene_Van_Tonder,

Welcome to our community and thank you for trying out Backendless!

I see that there is only registration call made, but in order to operate with current user, user should be logged in. So either redirect user to login page after registration, or login manually using his email & password right after registration (if your app does not require email confirmation).


Hi Stanislaw

Thank you, ah ok cool make sense. Will redirect to login, login then update. Thanks for the assistance and quick reply. Keep up the good work.

Kind regards,

You’re welcome!