Thursday, July 1, 2010

Secrets of SysLastValue

Over the years I have had quite a few customers ask me how to use the user setup and form queries. It's not so much the initial setup that is the issue, but how to distribute changes and setup to other users? And how can we move our changes from our development or test environment to production?

The answers lie in the secrets of the SysLastValue table.

SysLastValue is a kernel-level table that does not show up in the AOT data dictionary. There is however a form called "Usage Data" that can be accessed (check tools / development tools / application objects / usage data). The form itself is called "SysLastValue" (yeah, really) in the AOT. We can use the datasource on the form to right/click and table browse this mysterious table.

SysLastValue stores many different things. The majority of records you will find in there pertain to caching, or "last use" type of data, which will remember the last values you've entered on a dialog, the last printer selection you made for a report, etc. But, which is why we're interested, it will also store any user setup you make on a form, and any and all queries being stored. The field "recordtype" will indicate exactly the type of values stored.
We are interested in type "UserSetup" with the "isKernel" flag set to no, these are the user setups on forms, and the "elementName" field will tell you what form name.
Type "UserSetupQuery" contains the queries saved for a form. You will notice the "designname" contains the form's name, and the "elementname" field contains "f:formname".

So there we are. All the building blocks to build a little tool to distribute user setup and form queries among users, and even migrate between environments, or take backups before clicking "usage data" on the user options.

We have build our own little tool for this and actually taken it a step further. For more information on our IntelliMorph tool called "Personalization Center", check our company website at www.streamlinesys.com

3 comments:

  1. care to share the personallization center code plz ? :)

    ReplyDelete
  2. Hey Joris,

    It looks like since this post was written, http://www.streamlinesys.com has been replaced by / now redirects to http://www.sikich.com/.
    On the new site I couldn't find mention of the "personalization center" tool. Does it still exist in any form / is there an updated version available for AX2012?

    FYI: The underlying reason for my question is I'm looking for a simple way to disable all factboxes and preview panes for all users, but without disabling their ability to readd these where they find them useful.
    More information on this requirement can be found here: http://stackoverflow.com/questions/33015068/where-are-user-factbox-preferences-persisted-in-ax2012

    Thank-you in advance,

    JB

    ReplyDelete
    Replies
    1. Few things. I'm not sure if the personalization tool is exactly what you are looking for. I'm no longer with Streamline/Sikich but they still have the tool. If you use the contact pages on the Sikich website you can inquire and ask for a demo of it so you can get an idea of what it does.
      I never tried it but I'm thinking it may not deal with the factboxes directly, or at least it wasn't really intended for that so not a scenario we looked at. But it's worth the try.

      Delete