Coding support with Case Solution Proposed UI Action
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 06:13 AM
Hi guys
I have a Solution Proposed UI Action acting on the Case table. Basically I want to validate that the Analyst has put in External comments in the comments field before the state changes. I have the code but getting some weird results I cannot explain. I would appreciate any insight.
Here is the UI Action details
this is the custom script
function validateSolution() {
// Cache frequently accessed values
var form = g_form;
// Define required fields
var requiredFields = ['comments'];
// Validate 'comments' field
if (!form.getValue('comments')) {
form.addErrorMessage('Notes Tab: Please add solution comments for the customer.');
form.setMandatory('comments', true);
form.showFieldMsg('comments', 'Comments are mandatory while proposing a solution.', 'warning');
}
// Submit the form
gsftSubmit(null, form.getFormElement(), 'proposeSolution');
}
// Execute propose_solution in the server context
if (typeof window === 'undefined') {
propose_solution();
}
// Process state flow
function propose_solution() {
new global.StateFlow().processFlow(currentRecord, '8db14a63c3123100d6d210c422d3ae7a', 'manual');
}
Here is where it becomes interesting
Normally this is what you see , the comment box followed by the Post button and the Internal Notes check box. 
When you click on Solution Proposed and trigger the above code you will see both the External Notes & Internal Notes at the same time AND the post/internal notes Actions gone. see pic below
any help would be greatly appreciated
0 REPLIES 0