What defines the "First Save" vs "Every Time" criteria used for Automations

Discussions related to custom development with Select.
Post Reply
jwautier
Posts: 4
Joined: Wed Sep 29, 2021 5:45 pm

What defines the "First Save" vs "Every Time" criteria used for Automations

Post by jwautier »

We have a shell and several console apps running with the SDK (4.3.60210.48) and there was an automation created a while back that tries to keep the status fields in sync with each other regardless of what is saving the file.

The automation rule runs on "First Save", but in reality that seems to be running any time the file is saved and closed. This has been fine so far but we are creating a new console app to automatically cancel out invoices over a certain age and do whole slew of other business rules, notifications, etc. If all invoices that exist on a file are either canceled or removed, the Order Status is also set to Canceled. This is problematic as it then automatically changes values on Checklist items, which in turn drives Work Lists for several departments.

The problem is that in doing this (either through SP or through a console app), the automation runs and then sets both the Title and Escrow status to Canceled as well. I can certainly work around this by adding additional criteria to the automation snippet to NOT update the title or escrow status if they are already marked as complete, but I want to better understand the automation process and what is meant by "First Save" vs "Every Time" since automations run regardless of the saving source (like a console app created in the SDK).
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: What defines the "First Save" vs "Every Time" criteria used for Automations

Post by BobRichards »

"First time" means the automation snippet should only ever run once. It really sounds like your interval may be set to "every time".
  • Can you review the SPAdmin / Automation / Processes tab and look at the Rule again? Verify the first line says "First Time an order is saved".
  • Is it possible that you have multiple snippets that are interacting with each other? One snippet changing an order property and saving the order then another snippet running because he was triggered by the change.
  • Look at the SPAdmin / Automation / Monitoring tab. See if your snippet is running multiple times on the same order or if other snippets are acting on the order.
Let me know how it goes.
Bob Richards, Senior Software Developer, SoftPro
Post Reply