• vdanvoye6596
  • NEWBIE
  • 0 Points
  • Member since 2009
  • IT Applications Manager

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 1
    Replies

Dear All,
I'm using the SalesForce PHP toolkit.  Is there a way to find out which version of the SOAP API the toolkit is using?

https://help.salesforce.com/articleView?id=000354473&type=1&mode=1&language=en_US&utm_source=techcomms&utm_medium=email&utm_campaign=eol 

Is there  away to overwrite the "standard" list of Opportunity Products (line items) with a Visual Force page.  I know the opportunity objects are somewhat special - could not find a way to achieve that.  Thanks.

Hi,

I'm having a hard time getting to the child records of a query.  Here is what I have so far in my php script:

try {

  $mySforceConnection = new SforcePartnerClient();
  $mySoapClient = $mySforceConnection->createConnection("LINK_TO partner.wsdl.xml");
  $mylogin = $mySforceConnection->login($userName_live, $password_live);

  $query = "Select o.Id,o.Workshop_Stage__c, (Select Id, AccountId, WhoId, WhatId, Subject, IsTask, ActivityDate, OwnerId, Status, Priority, ActivityType, IsClosed, IsAllDayEvent, DurationInMinutes, Location, IsDeleted, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, CallDurationInSeconds, CallType, CallDisposition, CallObject, ReminderDateTime, IsReminderSet, Goal__c, Results__c, Actions__c, Comments__c, Visit_report__c, Goal_Classification__c, Link__c, Internet_Activity__c, Email_Name__c, Activity_Group__c From ActivityHistories) From OE_Registration__c o where o.Id='a0Q200000018zbMEAQ' LIMIT 10";

  $options = new QueryOptions(200);
  $mySforceConnection->setQueryOptions($options);
  $response = $mySforceConnection->query($query);
  $queryResult = new QueryResult($response);
  !$done = false;

  $record_size = $queryResult->size;

  if ($queryResult->size > 0) {

    while (!$done) {

      foreach ($queryResult->records as $record) {

  $Id = $record->Id;

  $Workshop_Stage__c = $record->fields->Workshop_Stage__c;

      }

      if ($queryResult->done != true) {

        echo "<br><br>***** Get Next Chunk *****<br><br>";

        try {
          $response = $mySforceConnection->queryMore($queryResult->queryLocator);
          $queryResult = new QueryResult($response);
        } catch (Exception $e) {

          print_r($mySforceConnection->getLastRequest());
          echo $e->faultstring;

        }
      } else {
        $done = true;
      }
    }
  }

} catch (Exception $e) {
  print_r($mySforceConnection->getLastRequest());
  echo $e->faultstring;

}

 

How would I access the AccountId field from the ActivityHistories object?

 

The output produced looks like:

 

SObject Object
(
    [type] => OE_Registration__c
    [fields] => stdClass Object
        (
            [Workshop_Stage__c] => Taken in Forecast
        )

    [Id] => a0Q200000018zbMEAQ
    [queryResult] => Array
        (
            [0] => QueryResult Object
                (
                    [queryLocator] => 
                    [done] => 1
                    [records] => Array
                        (
                            [0] => SObject Object
                                (
                                    [type] => ActivityHistory
                                    [fields] => stdClass Object
                                        (
                                            [AccountId] => 001200000017DNgAAM
                                        )

                                )

                            [1] => SObject Object
                                (
                                    [type] => ActivityHistory
                                    [fields] => stdClass Object
                                        (
                                            [AccountId] => 001200000017DNgAAM
                                        )

                                )

                            [2] => SObject Object
                                (
                                    [type] => ActivityHistory
                                    [fields] => stdClass Object
                                        (
                                            [AccountId] => 001200000016lrhAAA
                                        )

                                )

                            [3] => SObject Object
                                (
                                    [type] => ActivityHistory
                                    [fields] => stdClass Object
                                        (
                                            [AccountId] => 001200000017DNgAAM
                                        )

                                )

                        )

                    [size] => 4
                )

        )

)

 

Many thanks for any light you can shed on this for me!  Been struggling for hours and about to give up.

 

Hello,

I' m having a hard time getting to nested field values.  Here is the output I'm getting from my query:

 

QueryResult Object
(
    [queryLocator] =>
    [done] => 1
    [records] => Array
        (
            [0] => SObject Object
                (
                    [type] => Inco_Pax__c
                    [fields] => stdClass Object
                        (
                            [Workshop_Title__c] => MK02.01 CMM Module II Class ID 61739
                            [Town__c] => Brugge
                            [SystemModstamp] => 2009-05-29T08:32:48.000Z
                            [Start_Date__c] => 2009-01-18
                            [Salutation__c] =>
                            [SQ__c] => 1536875
                            [Person__c] => 003S0000004IwoIIAS
                            [OwnerId] => 00520000000hRVEAA2
                            [Outing_ref__c] => a03S0000000rLlkIAE
                            [Name] => I_0004
                            [Last_name__c] => Danvoye
                            [LastModifiedDate] => 2009-05-29T08:32:48.000Z
                            [LastModifiedById] => 00520000000hRVEAA2
                            [Job_title__c] =>
                            [IsDeleted] => false
                            [First_name__c] => Vincent
                            [Email__c] => email@gmail.com
                            [CreatedDate] => 2009-05-29T08:32:48.000Z
                            [CreatedById] => 00520000000hRVEAA2
                            [Country__c] =>
                            [Company__c] => Last Company created via Salesforce
                            [Company_SQ__c] =>
                            [Account__c] => 001S00000052MNsIAM
                        )

                    [Id] => a0KS0000000IU6EMAW
                )

            [1] => SObject Object
                (
                    [type] => Inco_Pax__c
                    [fields] => stdClass Object
                        (
                            [Workshop_Title__c] =>
                            [Town__c] => Seloignes
                            [SystemModstamp] => 2009-05-28T14:54:56.000Z
                            [Start_Date__c] =>
                            [Salutation__c] => Mr
                            [SQ__c] => 1536874
                            [Person__c] => 003S0000004IrRfIAK
                            [OwnerId] => 005S0000000EBSrIAO
                            [Outing_ref__c] => a03S0000000rK9cIAE
                            [Name] => I_0003
                            [Last_name__c] => Danvoye
                            [LastModifiedDate] => 2009-05-28T14:54:56.000Z
                            [LastModifiedById] => 005S0000000EBSrIAO
                            [Job_title__c] =>
                            [IsDeleted] => false
                            [First_name__c] => Vincent
                            [Email__c] => email@gmail.com
                            [CreatedDate] => 2009-05-28T14:53:40.000Z
                            [CreatedById] => 005S0000000EBSrIAO
                            [Country__c] => Belgium
                            [Company__c] => CompanyX
                            [Company_SQ__c] =>
                            [Account__c] => 001S00000055KoAIAU
                        )

                    [Id] => a0KS0000000IU5fMAG
                )

        )

    [size] => 2
)

 

 

How can I access the value of Email__c for example?

 

Many thanks for your suggestions,

 

Vincent

 

Is there  away to overwrite the "standard" list of Opportunity Products (line items) with a Visual Force page.  I know the opportunity objects are somewhat special - could not find a way to achieve that.  Thanks.