Hello guys,
I'm creating a form for my table in Dataverse and gotta need some Javascript for its event. I'm hitting error with my script which using function retrieveMultipleRecords.
The error is ->
A binary operator with incompatible types was detected. Found operand types 'Microsoft.Dynamics.CRM.msauto_serviceorder' and 'Edm.String' for operator kind 'Equal'.
It is coming from a statement like this :
var OrderId = Xrm.Page.getAttribute("jm_serviceorder").getValue()[0].id;
var Select = "?$select=jm_journalid";
var Filter = "&$filter=jm_ServiceOrder eq "+ OrderId ;
Xrm.WebApi.retrieveMultipleRecords('jm_expensedetail', Select + Filter ).then(.....
I actually don't have any knowledge about Javascript, so am not sure what is this function needed. All I can say is that the key that I'm using for the filter (jm_ServiceOrder) is a lookup field to another table, and that I believe why the error message bring up another name Microsoft.Dynamics.CRM.msauto_serviceorder which is a table name that it is lookup with.
While googling, I found something like this-> https://coderscollection.wordpress.com/2019/02/22/error-a-binary-operator-with-incompatible-types-was-detected-found-operand-types-entity-and-edm-guid-for-operator-kind-equal/
mentioned we need to specify WEB API Property name for the filter. What is WEB API Property name ? and how can I get it ?
What is actually the error means and how to resolved this ?
Thanks.

Report
All responses (
Answers (