When we use CRM API, can we hide the wrong stack information in the production environment.
*This post is locked for comments
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); } ); } );
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156