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

Is it possible to iterate an object that was fetched

$
0
0

I fetched a record with all it's fields - USING FETCH, and I need to iterate the fields, and according to each field to do something in my code, is it possible ?

a code for example:

xml ="<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false' count='1'>"
xml += "<entity name='game'>"
xml += " <all-attributes />"
xml += "<order attribute='modifiedon' descending='true' />" 
xml += "<filter type='and'>"
xml += "<condition attribute='gameid' operator='eq' value='123' />"  
xml += "</filter> </entity></fetch>"
 
//here I get the object I need the code works fine
var ret = myJS.ExecuteFetchRequest(xml);

for(i=0;ret[0].???;i++){

//get a specific field value and do something with it

}

I want to loop ret[0] - the object, but I can't find how... is it possible?

I tried to parse it using json and loop it from an array but ti didn't went well (if some one has an example to convert it to any array it will be helpful as well)..


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images