Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
We are using CRM online version 9.1
Recently we have started getting this error when a new Invoice is created.
TypeError: Cannot read property 'substring' of undefined at populateInvoicingDetails (https://.crm6.dynamics.com/%7B636992478630006820%7D/WebResources/new_PopulateInvoicingDetails?ver=-403942360:10:33) at eval (eval at RunHandlerInternal (https://.crm6.dynamics.com/form/ClientApiWrapper.aspx?ver=-403942360:154:1), <anonymous>:1:1) at RunHandlerInternal (https://.crm6.dynamics.com/form/ClientApiWrapper.aspx?ver=-403942360:160:1) at RunHandlers (https://.crm6.dynamics.com/form/ClientApiWrapper.aspx?ver=-403942360:118:1) at OnScriptTagLoaded (https://.crm6.dynamics.com/form/ClientApiWrapper.aspx?ver=-403942360:275:1) at https://.crm6.dynamics.com/form/ClientApiWrapper.aspx?ver=-403942360:244:1
Any help would be appreciated. Thanx.
Hi Huzefa Bootwala,
Please validate the java-scripts on save events. If you are doing any string operations if the filed value is empty system trigger error. Please share the code lines so we can suggest a solution.
Can you please share JS function written in the web resource -"new_PopulateInvoicingDetails" which is calling in on-save / on -load event.
Error says that you are doing subsisting on some attributes which does not have subsisting properties . I am suspecting that you need to do null check before doing substring like below -
var str = "Hello world!";
if(str != null )
var res = str.substring(1, 4);
Anyway, to see if the issue is caused by custom code, disable the onsave event on the invoice form and see if the error still appears.
Found the reason. Original code was added on change of a filed and also onLoad.
Thats the reason it was showing null error as it could not find the value for onChange.
Thanx everyone for the help.
Business Applications communities