Skip to main content

Notifications

Microsoft Dynamics CRM forum
Suggested answer

Script Error

Posted on by 27
Hi,
 
I'm having another issue while opening a specific lead profile. any solution to this?
 
 
Thanks
Categories:
  • Suggested answer
    Dima M. Profile Picture
    Dima M. 44 on at
    Script Error
    Are you using OOB forms or custom forms for leads? OOB forms ("Sales Professional" form for example) trigger a JS-function called ShowContactCardOnForm (as can be seen in the log you provided) on the OnChange event on the field "Existing contact?" (parentcontactid).
     
     
    This function is implemented in the msdynce_Common.js library. It's purpose is to set the visibility of a section called Summary_section_ContactQuickView (that section contains the parentcontactid and parentaccountid fields) to true or false depending wether parentcontactid contains a value or not (though this section only exists in opportunity forms, but not in lead forms). However, this function checks, wether some JS-objects (such as Xrm, Xrm.Page or the control for the section mentioned above) are defined or not. If not, the following function is called: 
    SalesProAppsTelemetryUtility.TelemetryData.ReportAppComponentFailureTelemetry(...)
    It seems, that in some cases the object SalesProAppsTelemetryUtility is defined and in some cases not (I think the true bug lies in the loading order between the library that contains the SalesProAppsTelemetryUtility-object and the msdynce_Common.js library). In the latter case, the error you are talking about is thrown. We had the same issue, which occured only some times.
     
    Possible solution is to remove the ShowContactCardOnForm-handler from the OnChange-event of the parentcontactid field. If you still need a logic to set the visibility of the mentioned section (and/or other sections/fields), you could implement your own JS-function.
     
  • JM-21060730-0 Profile Picture
    JM-21060730-0 3 on at
    Script Error
    We recently started seeing the same error when displaying a lead record in Dynamics 365 Sales. Here's the log:
     
    ReferenceError: SalesProAppsTelemetryUtility is not defined
        at ShowContactCardOnForm (https://salesprocrm.crm4.dynamics.com/%7b638540863240000188%7d/webresources/SalesPro/Common/msdynce_Common.js:662:30)
        at b._executeFunctionInternal (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:14:1267461)
        at b.execute (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:14:1265895)
        at https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:4:120182
        at i (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:14:113818)
        at ne._executeIndividualEvent (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:4:120156)
        at ne._executeEventHandler (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:4:116974)
        at Object.execute (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:4:114027)
        at w._executeSyncAction (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:14:640531)
        at w._executeSync (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:14:640258)
    Error Details:
    Event Name: onload
    Function Name: ShowContactCardOnForm
     
     
    I wonder if this is related to the change in the lead interface that Microsoft made? Instead of showing an overview of all leads, it now directly opens a lead record, which seems to have broken something. Would appreciate an explanation suitable for dummies. ;)
  • DJ-14060915-0 Profile Picture
    DJ-14060915-0 27 on at
    Script Error
    Hi , 
     
    Below is the Error Log
     
    Thanks.
     
    "
    ReferenceError: SalesProAppsTelemetryUtility is not defined
        at ShowContactCardOnForm (https://brandfinance.crm11.dynamics.com/%7b638537276800000170%7d/webresources/SalesPro/Common/msdynce_Common.js:662:30)
        at b._executeFunctionInternal (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:14:1267461)
        at b.execute (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:14:1265895)
        at https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:4:120182
        at i (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:14:113818)
        at ne._executeIndividualEvent (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:4:120156)
        at ne._executeEventHandler (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:4:116974)
        at Object.execute (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:4:114027)
        at w._executeSyncAction (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:14:640531)
        at w._executeSync (https://content.powerapps.com/resource/uci-infra-bus/scripts/app.f0499f6f182163ebe02f78abdde2f31a.js:14:640258)
    Error Details:
    Event Name: onload
    Function Name: ShowContactCardOnForm
    "
  • Dengliang Li Profile Picture
    Dengliang Li Microsoft Employee on at
    Script Error
    Hi,
     
    Could you download the log file and provide the log?

    Is the ShowConactRecordOnForm function a custom JavaScript?
    The JavaScript is added to the onload event on the lead form.

    If it is a custom JavaScript, could you provide the complete script code?
    According to the error message, it seems that SalesProAppsTelemetryUtility is used without definition.
     
    Best Regards,
    Dengliang Li
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,451 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,353 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans