1

Scenario:

  • Asset is related to Account (Each Asset has an Account)
  • Log is related to Account (Each Log has a Account)

When an Account is updated(a certain field), I want to create a Log record.

If a Log record exists for this Account - Don’t create one.

When an Asset is created I want to create a Log record related to Asset’s Account.

If a Log record exists for this Asset’s account which is being created - Don’t create one.

Here is the flow I’ve created.

enter image description here

Issue:

When I bulk insert Assets related to same account, it creates multiple Log records.

Required outcome:

When I bulk insert Assets related to same account, only one Log record should be created.

I assume this is because Salesforce bulkify flow execution. "Get Records" records element will query at the beginning and it will not find the record which got created in the previous flow interview.

Any of you have solved this kind of issue without code?

  • Is the process that launches your flow immediate or time delayed? I solved a similar issue yesterday by switching to immediate, but Im not sure which api was inserting the records (was via formassembly) and I need to do more testing to validate. Basically if the records are in the same transaction they can't see each other. I believe that is the same for code but there may be a way to handle it in code. – gorav Jul 13 at 14:22
  • @gorav thanks for having a look. This flow is called as an immediate action from process builder. – Ranga Jul 14 at 8:40

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.