- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 06:04 AM
Hi Everyone,
Can we use Glide record in UI action script ?I could see some recommendations that Client side script should not use Glide record . Is UI action client script if we have not checked the client check box ??
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 06:08 AM
yes you can use glide record in server side of ui action script.
Please have a look on below blog. it has mentioned an example.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 06:08 AM
yes you can use glide record in server side of ui action script.
Please have a look on below blog. it has mentioned an example.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 06:10 AM
If you have a scenario and only want to perform the glide record part in client side script, you can also consider the GlideAjax, here you will do all the glide record script part in client callable script include and then call it on your UI Action client side script by using Glide Ajax.
Please check the details about Glide Ajax on link below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 06:18 AM
Hi harshvardhan,
Thanks for your response, Here is my script
var newIncident = new GlideRecord('sn_hr_core_case');
newIncident.initialize();
newIncident.subject_person = current.subject_person;
newIncident.opened_for = current.opened_for;
newIncident.hr_service = current.hr_service;
newIncident.short_description = current.short_description;
newIncident.assignment_group = current.assignment_group;
newIncident.priority = current.priority;
newIncident.parent = current.parent;
newIncident.description = current.description;
newIncident.u_case_type = current.u_case_type;
newIncident.insert();
gs.addInfoMessage('New Case ' + newIncident.number + ' created.');
action.setRedirectURL(newIncident);
action.setReturnURL(current);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 06:21 AM
You can use this script on your UI Action. UI Action execute bother client and server side script. So you will not check "client" check box as true and just paste the script in your UI action, it will work.
Please check my first response, that blog will give you much more clear understanding about UI Action.