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
Leo DarkstarLeo Darkstar 

How to make this invocable ?

I am attempting to call this class from a Process Builder. I apparently need to use an @InvocableMethod command with it, but I can't get it to work because I get this error : 

 

Valid invocable parameters must be List types
 

I also need to use a @Future command with it. Is that possible in this scenario ?

Here is the actual method : 

@future(callout=true)
public static void pardotCallout(String contactId) {
        String returnedResponseFromPardot = Http_Utility_Pardot.pardotCreateProspect(new Set<Id> {contactId});
              }
 

 

ANUTEJANUTEJ (Salesforce Developers) 
Hi Leo,

As stated in the below link you can make an invokable method and call the above method that is annotated as a future callout.

>> https://salesforce.stackexchange.com/questions/120012/problem-with-process-builder-invocable-method-and-webservice-call-out

I hope this helps and in case if this comes in handy can you please choose this as the best answer so that it can be useful for others in the future.

Regards,
Anutej