Salesforce

DataViewToJSON (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

DataViewToJSON

Returns data from your program Data View into a JSON format string in a blob object.

Syntax:

DataViewToJSON(Generation, task var names, print var names)

Parameters:

generation: Numeric. A number that represents the task's hierarchic position in the runtime task tree. 0 depicts the current task, 1 its immediate ancestor, and so on.

task var names: Alpha. A comma-delimited list of all the names of variables that will be exported.

print var names: Alpha. A comma-delimited list of all the field names of the variables that will be exported. If the list is evaluated to ‘@’, then the engine will export the headers as defined in the task. If the name has a comma, it will be prefixed by the backslash (\) character.

Returns:

Success – a Blob that contains a JSON format string.

Usage:

You can use this function within Magic expressions to fetch data from Data View and convert/export into JSON as output string.

This output string is useful for rendering data in Angular code.

Note:

This function is available in Online, Batch, and RC, and Web Client tasks.

It can return Null.

It supports Charset UTF-8.

Reference
Attachment 
Attachment