sys property call into ui action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2024 05:55 AM
Hi all,
In sc task form have ui action button, The button called create story. When i click on create story then assignment group auto and product and cmdb_ci and theme populate in story based on assignment group.
I have written the sys properties
Sys properties
[
{
"assignment_group": "ServiceNow",
"product": "Hello",
"theme": "Hi",
"cmdb_ci": "ServiceNow"
},
{
"assignment_group": "office",
"product": "office",
"theme": " ",
"cmdb_ci": " "
}
]
based on the sys properties how to call this into UI action.
Regards,
Tharun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2024 06:05 AM - edited 11-13-2024 08:38 PM
var arr =JSON.parse(gs.getProperty('story_servicenow_group'));
var grp = current.getDisplayValue('assignment_group);
for(var i=0;i<arr.length;i++){
if(arr[i].assignment_group == grp){
current.setValue('<product_field_name>',arr[i].product);
current.setValue('<theme_field_name>',arr[i].theme);
current.setValue('<cmdb_ci_field_name>',arr[i].cmdb_ci);
current.update();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2024 08:28 AM
Hi shruti,
not work when i raise a request and see the story means now every thing is blank
regards,
Tharun