- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2015 03:51 AM
I want to know about the difference in script include and ui macro with respect to server side and client side script if any. i know the basic defination of both but i want to know with respect to scripting
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2015 04:41 AM
Hi Ravish,
Script Include always runs on the server side but can be called from client side. It always contains server side code only. It is mainly used to pass parameters from client codes and run some logic on server side. This is very powerful. You can even use these in the filter conditions, conditions, UI scripts and almost every where.
UI macro executes on the server side. It may contain both server side code (using <g:> or <g2> tags) as well as client side code(<script> tags). This is mainly used with UI pages.
Please check here for more info - Differences Among Scripts - ServiceNow Wiki
Thanks,
Tanaji

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2015 04:41 AM
Hi Ravish,
Script Include always runs on the server side but can be called from client side. It always contains server side code only. It is mainly used to pass parameters from client codes and run some logic on server side. This is very powerful. You can even use these in the filter conditions, conditions, UI scripts and almost every where.
UI macro executes on the server side. It may contain both server side code (using <g:> or <g2> tags) as well as client side code(<script> tags). This is mainly used with UI pages.
Please check here for more info - Differences Among Scripts - ServiceNow Wiki
Thanks,
Tanaji