Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

CRM Sensitive error messages revealed

Posted on by Microsoft Employee

When we use CRM API, can we hide the wrong stack information in the production environment.

*This post is locked for comments

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: CRM Sensitive error messages revealed

    You can use Failure callback handler & try catch block to capture the non-friendly errors/exceptions to give some user friendly alerts.

    Xrm.WebApi.createRecord("new_entity", data)
                   .then(
                       (success) => {
                           //do something
                       },
                       function (error) {
                           //debugger;
                           var alertStrings = {
                               confirmButtonLabel: "OK",
                               text: "Something went wrong. Please Contact Support team."
                           }
                           Xrm.Navigation.openAlertDialog(alertStrings)
                           .then(
                               function (result) { //successCallback
                               },
                               function (error) {  //errorCallback
                                   //console.log(error.message);
                               }
                           );
                       }
                   );

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans