I'm using Webapi (Xrm.WebApi.online.execute(request).then(successCallback, errorCallback)) to get all the entities within a system, but it throws error as
Expression of type 'Edm.String' cannot be converted to type 'Microsoft.Dynamics.CRM.EntityFilters
Code is :
var request = {
RetrieveAsIfPublished :true,
EntityFilters: "Entity",
getMetadata: function () {
var metadata = {
boundParameter: null,
operationType: 1,
operationName: "RetrieveAllEntities",
parameterTypes: {
"RetrieveAsIfPublished": {
"typeName": "Edm.Boolean",
"structuralProperty": 0
},
"EntityFilters": {
"typeName": "Microsoft.Dynamics.CRM.EntityFilters",
"structuralProperty": 0
}
}
}
return metadata;
}
}
Xrm.WebApi.online.execute(request).then(successCallback, errorCallback);
Any Ideas how to convert string to enum or the approach I'm using is incorrect?
*This post is locked for comments