Skip to main content
Avalara Help Center

Why am I getting TypeError Cannot call method substring of null AVA Functions.js$1553#2061 in Netsuite?

Overview

Getting error when importing transactions via .csv import or web services in Netsuite.

Environment

Netsuite Oneworld

Netsuite Basic

Resolution

Update your bundle. If this does not fix it you can edit your avafunctions.js file and make the code change below.

 

CHANGE:

soap += '\t\t\t\t\t\t<AddressCode><![CDATA[' + AVA_Def_Addressee.substring(0,50) + ']]></AddressCode>\n';

 

TO:

soap += '\t\t\t\t\t\t<AddressCode><![CDATA[' + (AVA_Def_Addressee != null ? AVA_Def_Addressee.substring(0,50) : '') + ']]></AddressCode>\n';