Layout variable migration tasks
This is the migration task for layout variables:
- For each layout that references a layout variable from both the client and server
scripts, make the appropriate change as determined here:
- Ideal solution: Use
ClientLayoutVariables
orServerLayoutVariables
, but notClientServerLayoutVariables
. - Alternative solution: Use
ClientServerLayoutVariables
, but allow the server to only write it, never read it. Verify whether the layout variable is safe to access from both the client and server. If so, use(Get)ClientServerLayoutVariables
API in both client and server scripting. The layout variable is safe if it is not used for UI interactions or for performing database updates. If it is not safe, move the layout variable to the server scripting. If you cannot move the code, use the(Get)ClientServerLayoutVariables
API in both client and server scripting.
- Ideal solution: Use
To acquire a list of layouts that need to be evaluated, search for all
layouts whose scripts contain
LayoutVariable
. Choose only the layouts with this
reference in both the client and server scripts.
Note: We suggest using a
ClientServerLayoutVariable
naming standard, such as to
append
_CSLV
to each variable name.