title: Service Now: Uncaught ReferenceError: func is not defined
body: <p>I have an issue when I order/add to card on one catalog service item . In fact, I am using a custom 'Catalog Client Script' on the onSubmit action to control if the customer added or not a attachment. Please find below my client script:
  <a href="https://i.stack.imgur.com/GR59d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GR59d.png" alt="client script"></a></p>
  
  <p>Script configuration:
  <a href="https://i.stack.imgur.com/MBUIf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MBUIf.png" alt="Script Configuration"></a></p>
  
  <p>The error when I order/add to card:
  <a href="https://i.stack.imgur.com/XbGhB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XbGhB.png" alt="Error order"></a></p>
  
  <p>I already targeted the cause, it's when I check the 'Applies on a Catalog Item view' (second image), but i need this to trigger the order and execute my script.</p>
  
  <p>Do you know how to solve this?</p>
  
  <p>Thank you.</p>