Resolution notes in case form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 05:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 06:06 AM
Hi @Krishna142 ,
Did you check if there are any client scripts that are set up to make the fields mandatory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 01:32 AM
Hi @Krishna142,
Did you see my earlier response? Essentially there are 2 areas where these values are set:
- Client Script: 'Validate Resolution Information (Case)'
- UI Policy: 'Show close notes if closed or resolved'
See my earlier response providing the screenshot of the UI Policy.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 12:47 AM - edited 12-02-2024 03:39 AM
Hello @Robbie Maybe you can help me, newb to scripting. I'm trying to make the cause notes of the case form to be mandatory
below is my code;
function onSubmit() {
var submitAction = g_form.getActionName();
//If "Close Case" or "Propose Solution" actions are triggered
// Add check for account QRO
var account = g_form.getValue("account");
//alert('This is Company Field Value: ' + account);
// Only apply the script if the account is QRO
if (account === "3115ed14878c52100caced370cbb3565") {
// If "Close Case" or "Propose Solution" actions are triggered
if (submitAction == "close" || submitAction == "proposeSolution") {
if (submitAction == "close" && g_form.hasField("closed_by"))
g_form.setValue("closed_by", g_user.userID, g_user.userName);
if (submitAction == "proposeSolution" && g_form.hasField("resolved_by"))
g_form.setValue("resolved_by", g_user.userID, g_user.userName);
//Validate if Cause Notes are populated
if (g_form.hasField("cause") && g_form.getValue("cause") == "") {
if (submitAction == "proposeSolution") {
g_form.addErrorMessage(
getMessage("To propose a solution, you must put a cause notes"),
);
} else {
g_form.addErrorMessage(
getMessage(
"To close a case, you must select a resolution code and add resolution notes.",
),
);
}
if (typeof g_tabs2Sections !== "undefined") {
var tabIndex = g_tabs2Sections.findTabIndex("cause");
if (tabIndex > -1) {
g_tabs2Sections.setActive(tabIndex); //checks if the findTabIndex() function found the 'cause' tab (i.e., if the index is valid, meaning it is greater than -1).
g_tabs2Sections.markTabMandatoryByField("cause"); // sets the tab mandatory
}
}
g_form.hideFieldMsg("cause");
if (g_form.getValue("cause") == "") {
g_form.showFieldMsg(
"cause",
getMessage("Cause notes are required."),
"error",
false,
);
}
return false;
}
}
}
}
however its not working.
though, its getting the account value.
what i did is i make a new On Submit client script based on the default one "Validate Resolution Information (Case)"
Also please see screenshot for reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 07:15 AM - edited 01-24-2024 02:02 PM
Hi @Krishna142,
Based on the baseline Customer Service Management (CSM) configuration there are 2 areas where these values are set:
- Client Script: 'Validate Resolution Information (Case)'
- UI Policy: 'Show close notes if closed or resolved'
Please see the below screenshot of the UI Policy: ' Show close notes if closed or resolved'
You will either need to update or inactivate both the Client Script and UI Policy accordingly.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie