You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am trying to do a request on an account, and expand some of the account records.
when i communicate with the API via another method/wrapper i have been using, i can do so by adding in:
I don't know what another method/wrapper you've been using so I can't comment on that. Can you provide a reference?
We do not provide expand on the Client class level. If you want, you can use OData client (available via $odataClient = $client->getClient() ). OData client includes getRecord method with queryOptions as a parameter; you can assign your expand expression to $queryOptions['Expand'].
$query = new QueryByAttribute('logical_name');
$query->ColumnSet = new ColumnSet(['name', 'email', ...etc]);
$query->ColumnSet->AddExpand('field_name', new ColumnSet(['attributes', 'here']));
Also for more advanced filtering:
// Filter where created at date is between two dates
$query->AddFilter(new Filter('created_at', ['2024-10-01', '2024-12-04'], 'Between'));
It would be good to contribute these changes back to the project.
Hello,
I am trying to do a request on an account, and expand some of the account records.
when i communicate with the API via another method/wrapper i have been using, i can do so by adding in:
expand: [{ property: 'property name', select: ['*'] }]
But i am not sure how to add in the expand code for the request:
$retrievedContact = $client->Retrieve( 'account', 'IDHERE', new \AlexaCRM\Xrm\ColumnSet( true ));
could you please provide an example, i want to expand multiple account properties to be retrieved in one request.
The text was updated successfully, but these errors were encountered: