- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 12-21-2024 02:51 AM
In this article, we will see how to hide the email section on the Compose pane of the Service Operations Workspace landing page.
On observation in Service Operations Workspace, the email section gets displayed when the record is put “On Hold” with the reason as “Awaiting Caller”. Also, the page alignment gets changed to “Stack” view instead of “Side by Side” tabs.
➡️ Navigate to UI Builder -> and select “Service Operations Workspace”.
➡️ Make sure the “Application” is as per the scope you wanted it to be added.
➡️ Select the “Record” page variant -> Clone SRP Record and deactivate the out-of-the-box.
Note: To know how to clone, follow this link Service Operations Workspace – How to clone the landing page?
➡️ In the clone SRP record, select “Activity Stream Compose” which holds Component visibility, Data, Display & Advanced sections.
➡️ In the Advance section, click on “Use static input” and select “Never”.
➡️ By doing this, the email mini compose section is hidden on the “Compose” pane.
However, if required you can select from the dropdown menu of the record.
#ServiceNow #ServiceOperationsWorkspace #ServiceNowCommunity
- 1,554 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Clone the entire page and create tech debt, just to remove a feature which should've been connected to a sys property in the first place.
Hope this gets updated soon.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Vegard S Before cloning the page, even I had checked if there is any configuration/property to be disabled without disturbing the out-of-the-box, couldn’t find one nor allowed me to explore more as it was read only.
Thanks for the time and feedback on it. If I come across shall update the article.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I've a question, does anyone assist me in it,
is there any another way to approach this requirement
to hide the email section on the Compose pane of the Service Operations Workspace landing page.
your input would be grateful.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@mdsking987 - I have thought out a different way to do this. Because they can leverage the OnHold button as a UI action for a better user experience.
where the modal dialog box that opens to pick the options is something I added. This seems doable to me without interfering with the OOTB.
GlideAjax script include(client callable)- "to populate the choice values of onhold reason":
var OnHoldReason = Class.create();
OnHoldReason.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getOnHoldChoices: function() {
var choiceGr = new GlideRecord('sys_choice');
choiceGr.addEncodedQuery('nameSTARTSWITHincident^element=hold_reason');
choiceGr.orderBy('sequence');
choiceGr.query();
var result = [];
var temp = {};
temp.displayValue = '--None--';
temp.value = '';
result.push(temp);
while (choiceGr.next()) {
var item = {};
item.displayValue = choiceGr.getValue('label');
item.value = choiceGr.getValue('value');
result.push(item);
}
return JSON.stringify(result);
},
type: 'OnHoldReason'
});
-------
UI action workspace code:
function onClick() {
// g_form.setValue('state', 3);
// // Call the UI Action and skip the 'onclick' function
// g_form.submit(g_form.getActionName());
var ajax = new GlideAjax('global.OnHoldReason');
ajax.addParam('sysparm_name', 'getOnHoldChoices');
ajax.getXMLAnswer(function(answerStr) {
var answer = JSON.parse(answerStr);
g_modal.showFields({
title: "Enter on-hold reason",
fields: [{
type: 'choice',
name: 'hold_reason',
label: getMessage('On hold Reason'),
mandatory: true,
choices: answer
}, ],
size: 'md'
}).then(function(fieldValues) {
g_form.setValue('hold_reason', fieldValues.updatedFields[0].value);
switch (g_form.getValue('hold_reason')) {
case '1':
g_modal.showFields({
title: "Enter Comments",
fields: [{
type: 'textarea',
name: 'comments',
label: getMessage('Comments'),
mandatory: true,
}, ],
size: 'md'
}).then(function(fieldValues) {
g_form.setValue('state', 3);
g_form.setValue('incident_state', 3);
g_form.setValue('comments', fieldValues.updatedFields[0].value);
g_form.save();
});
break;
case '5':
g_modal.showFields({
title: "Attach change record",
fields: [{
type: 'reference',
name: 'rfc',
label: getMessage('Change'),
mandatory: true,
reference: 'change_request',
referringTable: 'incident',
referringRecordId: g_form.getUniqueValue()
}, ],
size: 'md'
}).then(function(fieldValues) {
g_form.setValue('state', 3);
g_form.setValue('incident_state', 3);
g_form.setValue('rfc', fieldValues.updatedFields[0].value);
g_form.save();
});
break;
case '3':
g_modal.showFields({
title: "Attach Problem",
fields: [{
type: 'reference',
name: 'problem_id',
label: getMessage('Problem'),
mandatory: true,
reference: 'problem',
referringTable: 'incident',
referringRecordId: g_form.getUniqueValue()
}, ],
size: 'md'
}).then(function(fieldValues) {
g_form.setValue('state', 3);
g_form.setValue('incident_state', 3);
g_form.setValue('problem_id', fieldValues.updatedFields[0].value);
g_form.save();
});
break;
case '4':
g_modal.showFields({
title: "Attach vendor",
fields: [
/*{ // use this if your custom field to show case the vendor in related records tab of INC
type: 'reference',
name: 'u_vendor',
label: getMessage('Vendor'),
mandatory: true,
reference: 'core_company',
referringTable: 'incident',
referringRecordId: g_form.getUniqueValue()
},*/
{
type: 'textarea',
name: 'work_notes',
label: getMessage('Worknotes'),
mandatory: true
}
],
size: 'md'
}).then(function(fieldValues) {
g_form.setValue('state', 3);
g_form.setValue('incident_state', 3);
//g_form.setValue('u_vendor', fieldValues.updatedFields[0].value); to populate vendor
g_form.setValue('work_notes', fieldValues.updatedFields[1].value); // keep 0 instead of 1 so we do not have vendor field.
g_form.save();
});
break;
}
});
});
}