In DEBUG LOG this error is coming - The number of results does not match the number of interviews that were executed in a single bulk execution request.
public class InputWrapper { @InvocableVariable(label='JSON Payload') public String payload; } public class OutputWrapper { @InvocableVariable public String firstName; @InvocableVariable public String lastName; } @InvocableMethod(label='Parse Member JSON Payload') public static List<OutputWrapper> parse(List<InputWrapper> inputs) { List<OutputWrapper> results = new List<OutputWrapper>(); for (InputWrapper input : inputs) { Map<String, Object> dataMap = (Map<String, Object>) JSON.deserializeUntyped(input.payload); OutputWrapper result = new OutputWrapper(); result.firstName = (String)dataMap.get('Individual__dlm_FirstName__c'); result.lastName = (String)dataMap.get('Individual__dlm_LastName__c'); results.add(result); } return results; }
This is the apex code format I am using to parse payload. Can anyone help on this.
#Flow #Data Cloud #Flows #Bulk Insert Records #Platform Events Triggers #Platform-events
This code is working fine for updating multiple records but while creating multiple records it's showing error.