web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Use code to change theme

(0) ShareShare
ReportReport
Posted on by 4,131

Hi,

I tried to update sysuserinfo.theme value to change the user theme (the default color of the system). However even though I change the theme value, but the system still show the original color.

Any idea?

Thanks,

I have the same question (0)
  • Martin Dráb Profile Picture
    237,926 Most Valuable Professional on at

    What value did you set to the field?

    Did you reload the application or called appl.setTheme()?

  • Yuji Profile Picture
    4,131 on at

    Hi Martin,

    I just set the theme value to 0.

    Thanks,

  • Martin Dráb Profile Picture
    237,926 Most Valuable Professional on at

    What color do you expect to get by using 0?

    Also, you missed my other question. If it means that you didn't do either thing, that it's expected that nothing will happen.

  • Martin Dráb Profile Picture
    237,926 Most Valuable Professional on at

    0 seems to be a valid value, although you should use the enum: SysUserInfoTheme::Theme0.

    Note that it will make no difference if the current value is Theme0 too.

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Do you think you could share your code with us? It would help us identify potential issues in it.

  • Yuji Profile Picture
    4,131 on at

    update SYSUSERINFO  set THEME =0

  • André Arnaud de Calavon Profile Picture
    301,053 Super User 2025 Season 2 on at

    Hi Yuji,

    You shared an SQL statement, so I do assume this is not related to a production environment?

    What color(s) are selected now and which color do you want to apply?

  • Verified answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Please remember that if you update data via direct SQL (in a system where it's possible), you bypass AOS caching, so the AOS might still use an outdated value for the user.

    If the AOS has SysUserInfo record cached, and it doesn't know that it's updated, it will not make a database call if a session requests that record. But if you update the value via x++, AOS knows that the cached version is outdated and will discard it.

  • Yuji Profile Picture
    4,131 on at

    Hi André,

    Yes, we just want to change all testing environment to use the default theme (0). But it seems even we ran this script in SQL, it did not change the user's default color.

    Thanks,

  • Verified answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    If you make direct SQL updates in a test system, make sure that the AOS is not running during the update. Otherwise you will have cache issues.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 464 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans