RetrieveMSCRMRecords
This function retrieves rows from the specified Microsoft Dynamics CRM entity.
Arguments
RetrieveMSCRMRecords(1,2,3,4,5)
Ordinal | Type | Required | Description |
---|---|---|---|
1 | String | True | The entity from which to retrieve attributes |
2 | String | True | Comma-separated list of fields to retrieve |
3 | String | True | Field name for filter value |
4 | String | True | Operator for filter value |
5 | String | True | Value for filter |
Example
%%[
var @i
var @records
var @rowcount
set @records = RetrieveMSCRMrecords("Contact", "contactid, firstname, lastname", "firstName", "=", "Doug")
set @rowCount = rowcount(@records)
for @i = 1 to @rowCount do
var @record
var @firstName
var @lastName
var @id
set @record = row(@records,@i)
set @firstName = field(@record, "firstName")
set @lastName = field(@record, "lastName")
set @id = field(@record, "id")
output(concat("<br>firstName: ", @firstName))
output(concat("<br>lastName: ", @lastName))
output(concat("<br>id: ", @id))
next @i
]%%
Output
firstName: Doug
lastName: Smith
id: bcc3b7a0-3c61-4f1a-8cd3-1bada50af02d