I am using this OData query filter in my D365 portal.
For Guid filtering
var userId = '{{ user.id }}';
var contactfilteroption = "contactid eq guid'"+userId+"'";
var odataUrI = "https://yourportal.com/_odata/contacts?$filter="+encodeURIComponent(contactfilteroption);
For string filtering
var couponcode = eventdiscountamount.target.value;
var couponcodefilteroption = "stdsscouponcode eq '"+couponcode+"'";
var odataUrI = "https://yourportal.com/_odata/stdssdiscounts?$filter="+encodeURIComponent(couponcodefilteroption);
Comments
Post a Comment