I understand from this article that it is possible, my question is what do I choose in the process builder in order to pass a case and not some case's parameter? I don't want to pass the casenumber or Id and then query for the case, I would like to pass the case directly to the class.

public Case c;
@InvocableMethod(label='Get Case From Process Builder')
    public static void getCaseandDoSomething(List<Case> lst) {

  • 1
    The record id of the case in question?
    – glls
    May 28 '17 at 20:08
  • @glls sorry I though I mentioned that I don't want to use SOQL - anyway I edited my question
    – Json
    May 28 '17 at 22:22
  • Why you don't want to use SOQL? May 28 '17 at 22:27

Select Action Type "Apex", give it an Action Name, select your invocable class, Add an Apex Variable row, and map lst to Reference "[Case]". Note that parent and child records will not be available (e.g. case comments or contact, etc), but you should have full access to all case fields (e.g. contact Id, description, etc). The InvocableVariable you have defined is not necessary.

Defining an action that accepts cases


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.