- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2023 10:31 AM - edited ‎07-18-2023 10:32 AM
I am working on an UI action button, In which I need to use variables from client side function in next server side function . But I am getting undefined values in the description
Below is the code of UI action
///////////////////////////////////////////////////////////////////////////////////////////////////
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2023 08:27 AM
Hi @Reddymahesh ,
If you want to add to Workspace there is a Workspace tab where you can choose Workspace Form Button to make the UI action appear on the line of UI actions, or Workspace Form Menu to make it appears as a list item in the menu list.
If the code for the UI action I provided earlier works for the creation of RITM and can populate description successfully could you please mark the answer as correct? Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2023 07:25 PM
its not wokring
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2023 07:27 PM
script include :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 09:24 AM
Hi @Reddymahesh ,
Did you see the prompt after clicking the button? and did you get the log "gs.log('script include has been called 160216');"?
Your script include need to be Client callable (tick checkbox) and the script is something like this:
var testScriptInclude = Class.create();
testScriptInclude.prototype = Object.extendsObject(AbstractAjaxProcessor, {
testFunc: function() {
var gr = new GlideRecord('sc_req_item');
gr.initialize();
gr.assignment_group = '4a1d990547056510d2c3b604836d432e'; // ServiceNow admin team
gr.description = 'Change the name to: ' + this.getParameter('sysparm_fullname');
gr.insert();
},
type: 'testScriptInclude'
});
Your UI action: Client checkbox ticked and put the "ChangeName()" to the onclick field. You don't need to fill in 'Action name'.
I have tested before giving you solution, I also tested again and it works. Please check your script again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 10:13 AM
I am attaching screenshots of script include and UI action here, It is not working I am able to see the prompts but record is not getting created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 10:15 AM
In which scope you tested in code