Handling errors in lookups with PreSavePage scripts

Hi All,

I'm trying to use the preSavePage hook to handle 400/404 errors and tell the system to handle them as a success. I'm trying to see if a record exists before I try to create it.

I've found the documentation (linked below) and have implemented something similar to the sample code provided, but I can't see any way to actually test the code properly. Am I missing something or do I just need to run the whole flow and try to figure out what went wrong after?

Handling errors in lookups with PreSavePage scripts – Celigo Help Center

You'll have to run it to test out this functionality.