What is the merge syntax for all ids in a model?

  • 1
  • Question
  • Updated 3 years ago
I'm trying to use the Run Custom Apex Action in the action framework, and my InvocableMethod, like all InvocableMethods, starts with a list of Ids. Is there a way to use Merge Syntax to return all the Ids for all objects in a given model?
Photo of Jack Sanford

Jack Sanford, Champion

  • 8,322 Points 5k badge 2x thumb

Posted 3 years ago

  • 1
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
Fair warning that I haven't tested this with an Invocable Method, but I think this might work or at least get you close. If your model's name was Opportunities, for instance...
{{#$Model.Opportunities.data}}{{Id}},{{/$Model.Opportunities.data}}
You'll get a trailing comma this way for sure, and since this is a Global Context merge, the last/first functions aren't available, unfortunately. Does that help?