• ozhere
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

Hi,

 

I am trying to decode attachment body with  this code:

 

             foreach($response->records as $attachment){         
                    $attachmentBody = $attachment->Body;
                    echo base64_decode($attachmentBody);                   
                }

But the result is null. 'Echo $attachmentBody' prints some unreadable text. What is the right way to decode attachment body?

 

Thank you,

-O

  • February 23, 2009
  • Like
  • 0

Hi,

 

I am trying to get all attachments via SOQL query: "SELECT Name,Id, ParentId,Body  FROM Attachment".

But above query returns only one record. 

If I remove the Body from the query (SELECT Name,Id, ParentId  FROM Attachment), I get all attachment records.

Is there a way to grab all attachments with Body via SOQL???

 

Thanks

-O

  • February 19, 2009
  • Like
  • 0

Hi,

 

I am trying to decode attachment body with  this code:

 

             foreach($response->records as $attachment){         
                    $attachmentBody = $attachment->Body;
                    echo base64_decode($attachmentBody);                   
                }

But the result is null. 'Echo $attachmentBody' prints some unreadable text. What is the right way to decode attachment body?

 

Thank you,

-O

  • February 23, 2009
  • Like
  • 0

Hi,

 

I am trying to get all attachments via SOQL query: "SELECT Name,Id, ParentId,Body  FROM Attachment".

But above query returns only one record. 

If I remove the Body from the query (SELECT Name,Id, ParentId  FROM Attachment), I get all attachment records.

Is there a way to grab all attachments with Body via SOQL???

 

Thanks

-O

  • February 19, 2009
  • Like
  • 0
Hey,
 
I'm using, via a SoapCall, a webservice method that return an array of Objects.
 
Code:
webService static CObject__c[] getCObject(String id) {
  
  CObject__c[] c = [SELECT
     Id,
     Name,
     FROM HF_CObject__c];
       
  
  return c;
  
  
}

 
I'm using, in my php code the result method to retrieve my array of objects.
 
Code:
$parameters->id = $_GET[id];
$response = $soapClient->getCObject($parameters);
$result = $response->result;

 
Problem is when that query returns a single record, I don't get an array, but only an Object.
 
How can I solve that ?
 
Thx a lot,
 
Regards.
  • September 16, 2008
  • Like
  • 0