Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Help with odata / jscript query in CRM 2015

$
0
0

Hi all,

I have web resource that I am using to display a bing map with multiple push pins.

The problem I am having is with the odata filter. I have an example that filters using the ParentAccoundId to get all child records:

           var odataQuery = "?$select=Name,Address1_City,Address1_Latitude,Address1_Longitude&" +
               "$filter=ParentAccountId/Id eq guid'" + parentaccountId + "'";

but what I want is to just filter to show where the 'BusinessTypeCode' field equals 'Charity'. Ive tried a few variations and have the below but it doesn't work. I haven't any experience with odata so if anyone could advise what the syntax should be it would be much appreciated.

var accountbustype =  "Charity";

             var odataQuery = "?$select=Name,Address1_City,Address1_Latitude,Address1_Longitude&" +
                "$filter=businesstypecode/value eq'" + accountbustype + "'";

Thanks,

Terry


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images