+ Start a Discussion
BAGELBAGEL 

How to query a document?

Hi all,

I stored some images and script files in Documents. I need to access them from S-control. Salesforce developer support suggests me to do a query. Does anyone know how? Can anyone give me an example? Thank you in advance.

William

SovaneSovane

Hi Bagel,

 

 I you needed to query for a document you would use a soql query like this one :

<SELECT body FROM Document WHERE id='XXXXXX'>

 

However you could use the ressource field available on the SControl.

 

And if you only wanted to display a picture, you could use an url:

https://cs2.salesforce.com/servlet/servlet.FileDownload?file=XXXXXXXXXX

Message Edited by Sovane on 02-03-2009 12:26 AM