web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Script Error

(1) ShareShare
ReportReport
Posted on by 59
Hi,
 
I'm having another issue while opening a specific lead profile. any solution to this?
 
 
Thanks
I have the same question (0)
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    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
     
     
  • DJ-14060915-0 Profile Picture
    59 on at
    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
    "
  • JM-21060730-0 Profile Picture
    3 on at
    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. ;)
  • Suggested answer
    Dima M. Profile Picture
    49 on at
    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.
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans