function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Baz DensonBaz Denson 

What type is this apex class/method expecting?

public static void SendEmail(emailParam[] emailParams)

What is this expecting? List? 
Best Answer chosen by Baz Denson
Derek Hall 12Derek Hall 12
Yes, it is expecting a list. In apex, arrays and lists notation are interchangeable for one dimensional ones. These two lines are synonymous:
 
public static void SendEmail(emailParam[] emailParams)

public static void SendEmail(List<emailParam> emailParams)

Documentation:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_collections_lists.htm#array_methods

All Answers

Derek Hall 12Derek Hall 12
Yes, it is expecting a list. In apex, arrays and lists notation are interchangeable for one dimensional ones. These two lines are synonymous:
 
public static void SendEmail(emailParam[] emailParams)

public static void SendEmail(List<emailParam> emailParams)

Documentation:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_collections_lists.htm#array_methods
This was selected as the best answer
Baz DensonBaz Denson
Thanks Derek

I was trying to send a list but got the following error 

Method does not exist or incorrect signature: void SendEmail(List<String>) from the type joinforce.sendEmailInvocable
Derek Hall 12Derek Hall 12
Hi Barry

The issue you're having is that a List<String> is not compatible with a List<emailParam>.