Resolve Error: “TypeError Cannot read property ‘indexOf’ of null” when Saving Invoice

Error: TypeError Cannot read property ‘indexOf’ of null” is encountered when saving an Invoice record. This JS_EXCEPTION error occurs when the script is accessing a certain line item field which is currently hidden from the a form.

Solution

The Custom Form should be updated so that the line item field is displayed.

  1. Edit the Custom Form
  2. Navigate to Customization Forms Transaction Forms 
  3. Look for the preferred form used for Invoices
  4. Click the Edit link for the form
  5. Navigate to Sublist Fields tab 
  6. Look for the field(s) used in the script 
  7. Set Show checkbox to checked
  8. Click Save

Leave a comment

Your email address will not be published. Required fields are marked *