Notifications
Announcements
Hi, I need to prevent a user from manual case creation for a certain type of account.The condition is: If Account field equals Internal, pop an error message preventing user from creating the case.
Can you help share solution or the process on how can I do this?
function testfunc(executionContext) { // get form context var formContext = executionContext.getFormContext(); // replace 'title' with the logical name of your field var testfield = formContext.getAttribute("title"); if (testfield != null) { var testFieldValue = testfield.getValue(); if (testFieldValue == 'TTT') { executionContext.getEventArgs().preventDefault(); // show error message alert('Error: Cannot create case for Internal account.'); } } }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 29 Super User 2025 Season 2
Daniyal Khaleel 23 Most Valuable Professional
Fameeda Yaseen 10