We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Developing UI Scripts Compatible with Both UI16 and Workspace

RyoyaFukuda
Tera Contributor

Hi, all.

I'd like to create a UI script that works in both UI16 and Workspace.

I understand that for UI16, "ScriptLoader.getScripts" is used to call UI scripts, and for Workspace, "g_ui_scripts.getUIScript" is used.

What is the best way to create a UI script that is compatible with both environments? Specifically, I'm looking for best practices on how to reuse the script's logic across both environments while ensuring it is called appropriately in each.

5 REPLIES 5

Dr Atul G- LNG
Tera Patron

Hi @RyoyaFukuda 

UI16 is going to be deprecated soon, so I would recommend not spending much time on it. Instead, focus on building scripts for  Workspace 

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG

****************************************************************************************************************

@Dr Atul G- LNG 

While that might be a possibility in the future, currently, we understand that both options are usable. Since customers have requested the ability to use both, deprecating UI16 is not an option for us.

Tanushree Maiti
Tera Patron

Hi @RyoyaFukuda 

 

What use case you have where you need to create a UI script that works in both UI16 and Workspace.

 

Please share the use case.

 

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

@Tanushree Maiti 

Some users prefer to view it on the Workspace screen, while others find UI16 easier to navigate. Therefore, we would like to ensure that both options are available.