how to set values using UI action for agent workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2023 01:52 PM
I have created a UI action to create a Normal change from incident form on agent workspace, the UI action works fine. But I want to set value on incident with new change created and associate the change with incident from which change created.
Below is the code which is used workspace client script
function onClick(g_form) {
var result = g_form.submit('create_normal_chg_ws');
if (!result) {
return;
}
result.then(function() {
var params = {};
params.sysparm_parent_table = "incident";
params.sysparm_parent_sys_id = g_form.getUniqueValue();
params.rfc= g_form.getUniqueValue(); //set change on incident
g_aw.openRecord('change_request',-1,params);
});
}
with the help of params nothing is set for fields but I can see these values on URL.
Any help much appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2023 04:30 PM
@Josh11 if I have this correct, it sould be the same as a normal ui action but will need to enable the UI action via the workspace form button
There's an in-depth article on workspace UI Actions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2023 04:34 PM
Hi @Josh11 This should be the same as a standard UI Action but need to enable the action via the workspace form button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2023 02:12 AM
Gone through it but no option shown how we can pass values or set values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2023 05:43 PM
params is not used for setting values to the record(from the snow documents)。
It can only set below options.
"params": { "readOnlyForm": Boolean; "defaultTab": "String"; "hideDetails": Boolean }