0

I have to use an Autolaunched Flow to automate the following task:

  1. Retrieve all the certain object's records which meet a certain criteria.
  2. If the size of the collection is 1 - assign some field values from the only record to the one which originally triggered the flow.

The only idea I came up with:

  1. Retrieve records to the collection variable.
  2. Iterate through this collection and with every loop count increment the sizeCounter (default set to 0) variable
  3. If the size variable equals to 1 - retrieve records again, but now put only "the first one" to the new, single record variable

Looks like a very poor solution but I can't find any alternative. Is anyone aware of a better way to solve this problem?

  • Why would you want to retrieve all the object records and not only the record which triggered in first place? – user28452 Jun 13 at 13:20
  • Because I need to know that there's only one record meeting filter's criteria. – notmyf4ulty Jun 13 at 16:48

Your Answer

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

Browse other questions tagged or ask your own question.