RE: xrm webapi Execute CRUD request
I too had to reverse engineer the script, and while i didnt check it all the way, it appears that there are several bugs. i only tried retrieve so far. in order to do that you need to specify
this.entityReference = {
"etn": "incident",
"id": "85D8D20D-3C93-E811-A952-000D3AB0FC6E"
};
and add this as a parameter. this.columns is an array of the fields you want to query (schema name).
first of all in the developers guide it says to specify the operation name but the code doesnt accept "retrieveMultiple":
second, what i found out was happening is that for each requested field there is a match to see if it is of type "lookup"/"owner"/"customer" but the type that is retrieved from the metadata is in fact "Lookup" and thus no such field exists for the query (if there is a match it returns _field_value in order to add it to the select statement). there is also no way to add filter/expand statements (althouth the script is looking for it but always on an empty array). I still didnt have the time to investigate the other operations.