-
Notifications
You must be signed in to change notification settings - Fork 519
ObjectConversionRecipes
pozil edited this page Nov 14, 2024
·
3 revisions
Demonstrates how to convert data in CSV or JSON format
into Salesforce sObjects and Apex objects using DataWeave scripts in Apex.
Notice that all script output MIME types are set to application/apex.
Group DataWeaveInApex Recipes
Converts CSV data into a list of contact records.
Uses the /dw/csvToContacts.dwl DataWeave script.
| Param | Description |
|---|---|
inputCsv |
CSV data to tranform |
| Type | Description |
|---|---|
List<Contact> |
List of contact records |
Converts JSON data into a list of contact records.
Uses the /dw/jsonToContacts.dwl DataWeave script.
| Param | Description |
|---|---|
inputJson |
JSON data to tranform |
| Type | Description |
|---|---|
List<Contact> |
List of contact records |
Converts CSV data into a list of Apex objects.
Uses the /dw/csvToApexObject.dwl DataWeave script.
| Param | Description |
|---|---|
inputCsv |
CSV data to tranform |
| Type | Description |
|---|---|
List<CsvData> |
List of Apex CsvData objects |