Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Check Existing Record in the RITM form

Vengeful
Mega Sage

I have a catalog item to enroll new hardware product.

What should I do to check if the product is existing and prevent to submit the request.

For example this one: The hardware product is already existing. I want to show an info message to the requester that the record is already existing.

Vengeful_0-1729152829165.png

 

Vengeful_1-1729152868294.png

 

1 ACCEPTED SOLUTION

Brad Bowman
Mega Patron

If not using Service Portal, create an onSubmit Catalog Client Script which passes the Short description variable value to a Script Include via Glide Ajax.  The SI will query the hardware model table for a value matching the short_description field and the variable value passed in from the client.  Back in the client script, return false and show an alert/message if you want to prevent the submit.  If using Service Portal, a common workaround is to do the same onChange of a mandatory variable, clearing that variable if the record is found to effectively prevent submit.

View solution in original post

1 REPLY 1

Brad Bowman
Mega Patron

If not using Service Portal, create an onSubmit Catalog Client Script which passes the Short description variable value to a Script Include via Glide Ajax.  The SI will query the hardware model table for a value matching the short_description field and the variable value passed in from the client.  Back in the client script, return false and show an alert/message if you want to prevent the submit.  If using Service Portal, a common workaround is to do the same onChange of a mandatory variable, clearing that variable if the record is found to effectively prevent submit.