Hi
I having a problem when I make a retrieveMultipleRequest to Dynamics Web Api.
Token it's ok, in fact, I make a WhoIAm and works smooth.
------------------------
var resource = 'THE_ORG.crm4.dynamics.com/api/data/v9.0';
var dynamicsWebApi = new DynamicsWebApi({
webApiUrl: resource,
onTokenRefresh: TOKEN_CALLBACK
});
var request = {
collection: "contacts",
select: ["fullname", "firstname","lastname","emailaddress1","contactid","mobilephone"],
filter: "mobilephone eq '"+ phone_number +"'",
maxPageSize: 5,
count: true
};
//perform a multiple records retrieve operation
dynamicsWebApi.retrieveMultipleRequest(request).then(function (response) {
//SOME CODE
}).catch(function (error){
//catch an error
console.log('Houston... We have a problem');
console.log(error);
callback(null,'No Record');
});
------------------------
In fact, I can't execute the rest of the code
What I'm doing wrong?
The error code is not descriptive at all
------------------------
{
message: 'Unexpected Error',
status: 500,
statusMessage: 'Internal Server Error',
headers: '[Object]'
}
------------------------
Any ideas?
Kind regards