Hi,
i am using XRM.WebApi to retrieve records but when execute i get error in script. error :""Cannot read property 'account' of null".
is there any solution for this ?
Hi,
i am using XRM.WebApi to retrieve records but when execute i get error in script. error :""Cannot read property 'account' of null".
is there any solution for this ?
Hi, if you paste the number I can try to speed up things as I will take it
yes i will raise it to them. they will open a case. thanks and i will try again.
Is it possible for you to open a case and send here the number?
i believe so. however they are using this ClientGlobalContext.js.aspx. i believe this is suppose to define Xrm object
i tried it i did not work. they are using this <script type="text/javascript" language="javascript" src="ClientGlobalContext.js.aspx"></script>
as well
I've just copied and paste your code into the console app.
If the problem was "Xrm not defined" i would use the parent.Xrm like Marco suggested but I think the problem must be somewhere else.
Hi,
try with:
parent.Xrm.WebApi.online
Hope it helps,
Marco
will you be able to show me the code? i will compare it and it will be a great help thanks
Hi,
This is working fine for me, don't see any problem with it.
unfortunately i can not give the entire code. how ever i can give the retrieve that i am try in to do.
Xrm.WebApi.online.retrieveMultipleRecords("account", "?$select=accountid").then(
function success(results) {
for (var i = 0; i < results.entities.length; i++) {
var accountid = results.entities[i]["accountid"];
}
},
function (error) {
Xrm.Utility.alertDialog(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,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156