Salesforce Flow Transform Element Apex-Defined

Salesforce Flow Transform Element Apex-Defined

Salesforce Flow Transform Element with Apex-Defined stores the mapped data from the source data in Apex-Defined format.

In the Apex Class, use @AuraEnabled annotation for the variables declaration so that it will be available for mapping in the Transform Flow element.

Sample Apex Class for Apex-Defined:

public class AccountWrapper {
    @AuraEnabled
    public String accountId;
    @AuraEnabled
    public String accountName;

}

Sample Flow:

In the Welcome Screen, using Text Input, I am getting the Account Name.

In the Fetch Accounts Get Records element, I am fetching the Account records starting with the Account Name entered.

Using the Account Wrapper Transform element, I am transforming the Account records to Apex-Defined values.

Using End Screen element, I am displaying the Transformed records using Display Text.

Output:

Leave a Reply