The Zurich release has arrived! Interested in new features and functionalities? Click here for more

gs.getUser().getPreference() does NOT return the "value"

xiaix
Tera Guru

According to This Docs Page, it's saying that gs.getUser().getPreference() returns a "String".  It does not.

So in a widget, I have the following code in the Server Script part:
find_real_file.png

and this in my Client Script:
find_real_file.png

I have a user preference on the sys_user_preference table:

find_real_file.png

 

When I preview the widget, I get this in my console:

find_real_file.png

 

 

Now if I do something insanely ridiculous like this:

find_real_file.png

then fine, I get what I'm looking for.... however, I shouldn't have to do all this to when .getPreference() should be doing this for me.

 

 

1 ACCEPTED SOLUTION

ChrisBurks
Mega Sage

If you're not in a scoped app, if you're creating that preference on your own profile try logging out then back in. The preference should then be applied.

View solution in original post

10 REPLIES 10

xiaix
Tera Guru

I just realized a larger issue.  gs.getUser() is returning null

 

I think that's the root of my issue.

Why would gs.getUser() return null ???