- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2022 01:29 AM
I want the assignment group field in the modal to load only support groups where can i add the filter condition in the code here so that it shows only those.
function onClick(g_form) {
g_modal.showFields({
title: "Please provide all information for incident",
fields: [{
type: 'textarea',
name: 'u_incidentreason',
label: 'Incident description:',
mandatory: true
}, {
type: 'reference', // type of modal (ie text, reference, etc)
name: 'assignment_group', // reference field on the current record used to search
label: 'Assignment Group', // message to display above the search field
mandatory: true, // sets the field to mandatory
reference: 'sys_user_group', // table that the reference field in "name" refers to
referringTable: 'incident', // table of the current record
referringRecordId: g_form.getUniqueValue() // sys_id of the current record
}],
size: 'md'
}).then(function(fieldValues) {
g_form. setValue('u_incidentreason', fieldValues.updatedFields[0].value);
g_form.setValue("u_incident_creation", 'true');
g_form.save();
}
Solved! Go to Solution.
- Labels:
-
HR Service Delivery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2022 11:59 PM
Glad to help.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2023 12:41 AM
add like this change it to how you want
"query" : "caller_id=" + g_form.getValue("caller_id"),
Bharath Chintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2023 01:39 PM
This is not working, is this tested?