
Trying read data from Salesforce Accounts object and inserting to Sqlserver table , when I ran the flow getting below error
The execution of template action 'Apply_to_each_5' failed: the result of the evaluation of 'foreach' expression '@body('Get_records')?['value']' is of type 'Null'. The result must be a valid array.
Any thoughts?
Hi @ssivalasett ,
As the error suggests you need to put null check for the result before processing the array.
@empty(body('Get_records')?['value']) is equal to true do nothing
Thanks