Salesforce php echo数组值

时间:2018-05-08 19:08:24

标签: php arrays salesforce

我需要在Salesforce中使用PHP回显“父ID”(在CaseComments下)。关于如何实现这一点的任何建议,我试过可能会有不同的组合而没有成功?

我试过:     echo $record->CaseComments->records->{0}->ParentId

foreach ($response->records as $record) {
$sObject = new SObject($record);
echo "<pre>";
print_r($sObject);
echo "</pre>";`

输出:

SObject Object
(
[type] => 
[fields] => 
[Account] => stdClass Object
    (
        [Id] => 
        [Name] => Test Company
    )

[CaseComments] => stdClass Object
    (
        [done] => 1
        [queryLocator] => 
        [records] => Array
            (
                [0] => stdClass Object
                    (
                        [Id] => 00a0c00001ALfC5AAL
                        [CreatedDate] => 2018-05-03T17:10:00.000Z
                        [IsDeleted] => 
                        [IsPublished] => 
                        [LastModifiedById] => 0050c00000CmnRKAAZ
                        [LastModifiedDate] => 2018-05-03T17:10:00.000Z
                        [ParentId] => 5000c00001Z6KYoAAN
                        [SystemModstamp] => 2018-05-03T17:10:00.000Z
                    )

            )

        [size] => 1
    )

[CaseNumber] => TT-000xxxxx
[CreatedDate] => 2018-05-03T14:34:29.000Z
[Status] => Escalated To Vendor
[Subject] => Test Ticket
[Type] => Broken REP/RAPS Ring
)

0 个答案:

没有答案