Uncaught TypeError: Cannot read properties of undefined (reading ‘REST’

Forum Post: Change the Filter On option on Opportunity Associated View for Account form

I have been using this code to open an look up window it is throwing an error “Uncaught TypeError: Cannot read properties of undefined (reading ‘REST'”

Please help me in getting out of this!

var strAccountFilter = “$filter=AccountId eq (guid'” + strAccountId + “‘)”;
//var DefaultViewId = Xrm.Page.getControl(“cmc_carrieridaccount”).getDefaultView();

parent.SDK.REST.retrieveMultipleRecords(“Account”, strAccountFilter, getAccountOnSuccess, errorHandler, function () { });


function getAccountOnSuccess(result) {
if (result == null || result.length == 0)

var strURL = “_controls/lookup/lookupinfo.aspx?AllowFilterOff=0&DefaultType=11129&DefaultViewId=%7bEA7EB181-7C13-4466-A681-87A22A54A9D9%7d&DisableQuickFind=0&DisableViewPicker=0&IsInlineMultiLookup=0&LookupStyle=single&ShowNewButton=1&ShowPropButton=1&dType=1&mrsh=false&objecttypes=11129&rDependAttr=quote.cmc_accounttoquoteid&rId=”;

strURL += “{” + result[0].AccountId + “}&rType=1&relationshipid=cmc_account_cmc_carrier_CarrierIDAccount”;

Source link

Leave a reply

Please enter your comment!
Please enter your name here