function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vdanvoye6596vdanvoye6596 

Parsing nested fields

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

 

Park Walker (TAGL)Park Walker (TAGL)
Take a look at this post.