+ Start a Discussion
Vipin  PulinholyVipin Pulinholy 

Display Relationship Query Result



I have this code:


var soql= SELECT c.Account.Name (SELECT Subject,ActivityDate, Description from ActivityHistories) FROM Contact c WHERE Name Like 'XYZ%' var sql = sforce.connection.query(soql); var records = sql.getArray("records"); for (var a in records) { returnArray[a] = new Array(); alert(records[a].Name); //alert(records[a].ActivityHistories.Subject); .... .... }

I get Contact Name from  records[a].Name. I am not sure how to get the values of ActivityHistories object.

I wanted to get the values of  Subject,ActivityDate, Description and display it to the page.

Could you please help me ? how can we reference this Relatiohip query result?

Thanks for Your Time.

Best Answer chosen by Admin (Salesforce Developers) 

All Answers

Vipin  PulinholyVipin Pulinholy
This was selected as the best answer

This is really helpfull! Specially when the link works!