Prevent Submit of a Record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 12:44 PM
Hello all,
I'm looking to see if anyone has any ideas on how I can block the submit button from working on a record producer when a field is selected?
My goal is to prevent them from submitting the ticket and nudge them to the knowledge article on how to address the issue such as how to report spam emails so it is reported to our spam filter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 01:02 PM
Hello @AdamRich
You need to use on submit catalog client script. You can refer the below code to prevent from submission as same I tried it in my PDI it is working as expected.
function onSubmit() {
// Replace the field name as per your requirement
if(g_form.getValue("department_or_group")=="department"){
g_form.addErrorMessage("Please read the knowledge article, how to report spam emails"); // depend on requirement.
return false;
}
}
Please mark my answer as accepted solution and give thumbs up, if it helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2024 08:52 PM
Write onsubmit client script
Put condition
If(g_form.getValue('variable/field_Name')=="value")
{
alert(" your content");
return false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2024 01:55 AM
While preventing them to submit a ticket can be a way to force end users to a knowledge article I don't believe it's the right experience for them to not be able to submit a ticket if the kb article isn't relevant to their issue. You can use the contextual search applied to the short description so that anything they type can be relevant to a kb article. There they can find and navigate to the article they may need to solve their issues and then they'll be more familiar with the knowledgebase on the portal. But this still allows them to submit a ticket if they need to. The required article can always be sent to them after as a comment to further educate them.