0

I have some elements in a screen flow that should only show in Classic UI, and others that should only show in Lightning UI. I haven't found a way to choose which to show based on the current UI the user was in when launching the flow (Lightning or Classic).

Is there any way I could set these conditions? If not, I'll create one flow for Lightning and another one for Classic, just wanted to see if this could be avoided.

EDIT: Could my first element in the flow be an apex action that checks the current runtime when the flow is being run, and save that in a variable to use in a decision element / component visibility condition later on?

Thanks!

0

Found it! The global variable $User.UIThemeDisplayed gives me the current UI of the user, so I have an assignment element just at the beginning of the flow to assign the "UITheme" variable:

[1]: https://i.stack.imgur.com/iBKGW.png

And then I can use the value of this variable for element visibility / decision elements. In a decision element I can also get the value of $User.UIThemeDisplayed without having done an assignment before, but when establishing component visibility conditions $User.UIThemeDisplayed is not available for use, so in this case it's necessary to have $User.UIThemeDisplayed assigned to a variable before.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.