How to block catalog submission if portal attachment CSV is invalid?

Leonela
Tera Contributor

Hi all,

I’m working on a catalog item (Service Portal) that requires users to upload a .csv file using the default portal attachment.

I need to:

  • Prevent submission if the attached file is not a .csv or is missing required headers (like batch_ref, origin, etc.)

  • Show a user-friendly error message explaining what’s wrong

  • Ideally block the entire request (REQ + RITM) if the file is invalid

I’ve tried:

  • onSubmit client script - can’t access the attachment before submit

  • GlideAjax - same issue, no attachment available yet

  • Business Rule on sc_req_item - works for validation, but REQ still gets created. This leads to a less-than-ideal user experience, since users have to go back and resubmit the catalog item from scratch.

Is there a supported way to fully block submission with the portal attachment field? Or is a custom widget or attachment variable the only real option? - I ask because the uploaded file will eventually be sent to an AWS S3 bucket via IntegrationHub, so it would be ideal if the file ends up in sys_attachment (like the default portal attachment does), rather than inside a variable, to simplify downstream automation.

Thanks in advance!

0 REPLIES 0