• tsu kane
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Please tell me How to query all Chatter Files attached to a record by PHP.

=== Sample Code ===
$sforce_connection = new SforcePartnerClient();  
$soap_client = $sforce_connection->createConnection(PARTNER_WSDL_FILE, null);  
echo("ConectClassOK<br>");

try {  
    $login = $sforce_connection->login(LOGIN_ID, LOGIN_PASS); 
    $login_info = get_object_vars($login);  
    $session_id = $login_info['sessionId'];  
    echo "LoingOK -> Session Id : " . $session_id . "<br>";  
} catch (Exception $e) {  
    var_dump($e); 
}

try{
    $query = 'SELECT PostCount, ParentId FROM ChatterActivity';
    $response = $sforce_connection->query($query);
    $queryResult = new QueryResult($response);

    for ($queryResult->rewind(); $queryResult->pointer < $queryResult->size; $queryResult->next()) {
        print_r($queryResult->current()->ParentId);
    }

    ・・・ The point which isn't understood ・・・
======
Please tell me How to query all Chatter Files attached to a record by PHP.

=== Sample Code ===
$sforce_connection = new SforcePartnerClient();  
$soap_client = $sforce_connection->createConnection(PARTNER_WSDL_FILE, null);  
echo("ConectClassOK<br>");

try {  
    $login = $sforce_connection->login(LOGIN_ID, LOGIN_PASS); 
    $login_info = get_object_vars($login);  
    $session_id = $login_info['sessionId'];  
    echo "LoingOK -> Session Id : " . $session_id . "<br>";  
} catch (Exception $e) {  
    var_dump($e); 
}

try{
    $query = 'SELECT PostCount, ParentId FROM ChatterActivity';
    $response = $sforce_connection->query($query);
    $queryResult = new QueryResult($response);

    for ($queryResult->rewind(); $queryResult->pointer < $queryResult->size; $queryResult->next()) {
        print_r($queryResult->current()->ParentId);
    }

    ・・・ The point which isn't understood ・・・
======