Dynamics 365 CRM – How to resolve script error, while saving leads?

I have Dynamics 365 version 9.0 environment in Australia, and I was receiving a script error while I was saving a new lead in Dynamics 365 CRM. The error was as below:

Error on leads snapshot for forum

In this script error, MarketingSales reference seemed missing in my ABC Dynamics organisation and I would need to import the Lead entity in the instance. The detailed logs were as below:

ReferenceError: ‘MarketingSales’ is undefined

   at eval code (eval code:1:1)

   at RunHandlerInternal (https://abc.crm6.dynamics.com/form/ClientApiWrapper.aspx?ver=-262047490:159:1)

   at RunHandlers (https://abc.crm6.dynamics.com/form/ClientApiWrapper.aspx?ver=-262047490:118:1)

   at ExecuteHandler (https://abc.crm6.dynamics.com/form/ClientApiWrapper.aspx?ver=-262047490:81:1)

   at Mscrm.TurboForm.Control.CustomScriptsManager.prototype.$Db_1 (https://abc.crm6.dynamics.com/_static/form/formcontrols.js?ver=-262047490:5068:17)

   at Mscrm.TurboForm.Control.CustomScriptsManager.prototype.executeHandler (https://abc.crm6.dynamics.com/_static/form/formcontrols.js?ver=-262047490:5006:13)

   at Mscrm.TurboForm.Control.CustomScriptsManager.prototype.executeHandlerByDescriptor (https://abc.crm6.dynamics.com/_static/form/formcontrols.js?ver=-262047490:5037:13)

   at Mscrm.TurboForm.Control.ViewModel.FormViewModel.prototype.fireOnLoad (https://abc.crm6.dynamics.com/_static/form/formcontrols.js?ver=-262047490:21486:21)

   at Mscrm.TurboForm.Control.Data.DataEntity.prototype.$My_1 (https://abc.crm6.dynamics.com/_static/form/formcontrols.js?ver=-262047490:18447:17)

   at $v_7 (https://abc.crm6.dynamics.com/_static/form/formcontrols.js?ver=-262047490:18373:21)


I imported an unmanaged solution in the environment for “Lead” entity and published all customisation. It worked, and i am not receiving script error so far.

Thank you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.