<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>7 Feb 2020 20:14:06 Z</lastBuildDate><pubDate>7 Feb 2020 20:14:06 Z</pubDate><description>Hi all.&#13;
I need to obtain the result of a SOQL query using 2 salesforce objects.&#13;
Using the salesforce query editor, the results are ok.&#13;
But when I to obtain the results into Windev, only the itens related to the first object are ok, the other error.&#13;
Below a part of the code:&#13;
&#13;
gsQryTxt = StringBuild(gsQry,EDT_Pedido)&#13;
SFRes is sfExecuteQueryResult&#13;
SFRes = SFExecuteQuery(SFCnt,gsQryTxt)&#13;
ARec is sfObject&#13;
&#13;
FOR EACH ARec OF SFRes&#13;
	IF HReadSeekFirst(Pedidos,IDPed,ARec.IDPED__c) = True THEN &#13;
		Trace("Produto = " + ARec.Produto__c)&#13;
		Trace("Pedido " + ARec.OrderNumber + "já cadastrado")&#13;
		CONTINUE&#13;
	END&#13;
END&#13;
&#13;
"Produto" is a field of the first object, and is OK.&#13;
"Pedido" is a field of the seconf object, and ERROR - not in ARec ...&#13;
&#13;
There are anybody knows how to resolve that?&#13;
&#13;
TIA</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/67629-salesforce-query-result/read.awp</link><title>Salesforce query result</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster></channel></rss>
