Glide Modal :- Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 05:19 AM - edited 04-19-2023 05:22 AM
Hi ,
There are two fields,
assigned to which will be dependent on assignment group. So when I am selecting Assignment group as ABC , only ABC group members should be available to select in assigned to field. Can we achieve this? Can we pass dynamically values to script Include each time we are changing assignment group? In glide modal(Agent Workspace)
Example Screenshot
Please guide on this. Thanks !!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 09:07 AM
@harishkolla Could you please share the code of your modal window. May be I will be able to share my inputs on the basis of it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 09:35 AM - edited 04-19-2023 09:36 AM
Hi @Sandeep Rajput ,
Thanks for the quick response, I can paste the basic code here
function onClick(g_form) {
var messages = [
'Transfer Type', 'New HR Service', 'Transfer Case',
'Warning: Transferring a case closes all related child cases or tasks.'
];
getMessages(messages, function() {
var sysId = g_form.getUniqueValue();
var table = g_form.getTableName();
var gA = new GlideAjax("sn_hr_core.hr_CaseTransferAjax");
gA.addParam('sysparm_name', 'getTransferFields');
gA.addParam('sysparm_sys_id', sysId);
gA.addParam('sysparm_table_name', table);
gA.addParam('sysparm_subject_person', g_form.getValue('subject_person'));
gA.getXMLAnswer(openModal);
function openModal(answer) {
answer = JSON.parse(answer) || {};
var fields = [];
var oneTransferMethod = (answer.transferMethods && answer.transferMethods.length == 1) ? true : false;
if (answer.transferMethods && answer.transferMethods.length > 1) {
fields.push({
type: 'choice',
name: 'reasonChoice',
label: getMessage('Transfer Type'),
value: (answer.transferMethods && answer.transferMethods.length > 0) ? answer.transferMethods[0].value : '',
choices: answer.transferMethods,
mandatory: true
});
}
fields.push({
type: 'choice',
name: 'newService',
label: getMessage('New HR Service'),
choices: answer.services,
mandatory: true
});
var warning = getMessage('Warning: Transferring a case closes all related child cases or tasks.');
g_modal.showFields({
title: getMessage('Transfer Case'),
fields: fields,
instruction: warning,
size: 'md'
}).then(function(response) {
var transferMethod = (oneTransferMethod) ? answer.transferMethods[0].value : response.updatedFields[0].value;
var hrService = (oneTransferMethod) ? response.updatedFields[0].value : response.updatedFields[1].value;
var ga = new GlideAjax("sn_hr_core.hr_CaseTransferAjax");
ga.addParam("sysparm_name", "transferCase");
ga.addParam("sysparm_transfer_method", transferMethod);
ga.addParam("sysparm_hr_service", hrService);
ga.addParam("sysparm_sys_id", sysId);
ga.getXMLAnswer(saveForm);
function saveForm(result) {
result = JSON.parse(result);
if (!result.error) {
g_aw.openRecord(result.table, result.id);
} else {
g_modal.alert(result.error);
}
}
});
}
});
}
Requirement:- If I select the user from the above dropdown then only the work notes should be visible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2023 06:41 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2023 07:13 AM
@harishkolla The code which you have shared is part of Transfer case modal view, which does not have any field for user or worknotes. Hence I am confused here as to how these two different functionalities are connected?