Posts

Showing posts with the label Unable to get property {Entity Name} of undefined or null reference Dynamics CRM WebApi

Unable to get property {Entity Name} of undefined or null reference Dynamics 365 CE on-premise engine 9.x WebApi

Scenario : I want to retrieve record from backend through javascript in Business Unit form of Dynamics CRM by utilizing Web API feature. but when i run following script; Xrm.WebApi.retrieveRecord( "bnb_place" ,  placeId, "?$select=bnb_areaid&$expand=bnb_areaid($select=bnb_areaid,bnb_name)" ).then( function success(result) { return result; }, function (error) { writeMessage(error.message); } ); then I get; Unable to get property 'bnb_place' of undefined or null reference error message. Here is error stack; TypeError: Unable to get property 'bnb_place' of undefined or null reference at Mscrm.XrmUtility.prototype.getEntitySetName (http://192.168.1.147/SightseeRMBnB/_common/global.ashx?ver=-1578524476:6780:143205) at Xrm.Utility.getEntitySetName (http://192.168.1.147/SightseeRMBnB/_common/global.ashx?ver=-1578524476:4108:5) at XrmClientApi.WebApi.WebApiPar