Automatically attach a file to an existing record when State has changed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2025 08:46 AM - edited 05-01-2025 09:02 AM
Currently, I have created an after Business Rule (BR) on insert w/advanced script to automatically attach a file to a record based off of the State field changing from New to Work In Progress.
It is working but not w/the perfect user experience. The user clicks on a UI Action (i.e., Work In Progress) that changes the State from New to Work In Progress. The page reloads w/no errors and the State field changes to Work In Progress as expected. Unfortunately the form has be reloaded by the user one more time to attach the file to the record. It's like the script copies the attachment but doesn't successfully attach it until the second page refresh.
I spoke to a colleague who stated there may be an ASYNC issue behind this. I'm believe him to be correct, since the BR trigger occurs when the State > Changes to > Work In Progress.
Attached are screenshots of my BR:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2025 09:03 AM
Change it to a before business rule. That way it should insert the attachments before the form reloads.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2025 07:36 AM
Thank you, @Brian. I'll give that a shot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2025 08:32 AM
@Brian, unfortunately changing the BR to before did not change the behavior of how the file is attached. The user still needs to click refresh to attach the file.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2025 08:36 AM
My only other thought would be to try changing the order on the BR. Set the number to something lower like 10 so it is one of the first BR to run.