- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 01:49 AM
As we have Link to Major Incident OOB option available to merge major incidents and it is working fine for "list view"
Similarly I have activated Link to Major Incident option for Form View but it is not working as expected.
Can anyone help me for activating link to major incident option for Form view and that button should be working as well.
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 06:09 AM
Sorry, I neglected to point out that on the new UI Action record you need to also uncheck the 'List choice' box. If you didn't give this record a different name there are 2 actions for the list choice and it's running the wrong one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 04:24 AM
It sounds like you checked the box for 'Form button' on the same UI Action. It would be best if you undid that, then Insert and Stay on the UI Action record to create a duplicate. On this new version, check the 'Form button', uncheck either or both of the 'List v2/v3 Compatible' options, and update the Comment to something more like:
Provides option to link current record to a Major Incident.
Replace the Script with this to link the currently-viewed incident as a child to the Major Incident that you select:
function showSelectMajorIncidentDialog() {
var title = g_form.getValue('name');
var incident = g_form.getUniqueValue();
if (incident) {
var o = new GlideModal('sn_major_inc_mgmt_select_major_incident_dialog_ui');
ScriptLoader.getScripts('/scripts/incident/glide_modal_accessibility.js', function() {
getMessage("Choose a Major Incident", function(msg) {
o.setTitle(msg);
o.setPreference('selected_incidents', incident);
o.template = glideModalTemplate;
o.on('bodyrendered', function(event) {
glideModalKeyDownHandler(event, o.getID());
});
o.render();
});
});
CustomEvent.observe("mi.addToExisting.associate", function(answer) {
if (answer) {
var ans = answer[0];
var url = new GlideURL('incident.do');
url.addParam('sys_id', ans.getAttribute('incidentId'));
var incidentLink = "<a href=" + url.getURL() + ">" + ans.getAttribute('displayValue') + "</a>";
GlideUI.get().addOutputMessage({
msg: new GwtMessage().getMessage('Incident was added as child Incident to Major Incident {1}', title, incidentLink),
type: "info"
});
}
o.destroy();
});
CustomEvent.observe("mi.addToExisting.cancel", function() {
o.destroy();
});
o.on('beforeclose', function() {
CustomEvent.unAll("mi.addToExisting.cancel");
CustomEvent.unAll("mi.addToExisting.associate");
});
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 05:57 AM
This solution is useful for me, but I want list view and form view both to be work at same time. Now only form view is working and list view is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 06:09 AM
Sorry, I neglected to point out that on the new UI Action record you need to also uncheck the 'List choice' box. If you didn't give this record a different name there are 2 actions for the list choice and it's running the wrong one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 11:55 PM
Thanks It was working as expected but I am getting only 1 incident or blank dialogue box, Can you tell me how I can have all the incident list on form view not only major incidents list.