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

Announcements

No record found.

News and Announcements icon
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
    238,782 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
    238,782 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
    238,782 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,166 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
    303,381 Super User 2026 Season 1 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,166 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,166 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 514 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 390

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans