function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Craig WoodmanCraig Woodman 

Before update flow trigger on web to lead creation?

I had a question, but answered it on my own. So since my search didn't reveal anything, I figured I would post it here in case anyone else is looking.

Does a Before Update flow (or one that is triggered by record create or change, that saves before the record is updated) work with lead creation by web-to-lead?

I had not seen this in any documentation. And searches didn't show anything. So I figured I would do some tests on my own.

I set up a test flow to write text to the Lead Description field on creation, that says "The before update flow worked!!!" I then went to the website, downloaded a catalog, and checked the description field. The text was written, with no delay to the web to lead record.

My use case for this is changing the record type automatically on a web to lead record, which passes in certain values. It works perfectly!

I hope that this helps anyone who is looking for this information!
Best Answer chosen by Craig Woodman
Craig WoodmanCraig Woodman
Thanks Anutej,  While this can be completed with a trigger, I wanted to show the functions of the new before save flow actions, and answer a question that I could not find about these flows.  Hopefully people can see this and see both solutions.

All Answers

ANUTEJANUTEJ (Salesforce Developers) 
Hi Craig,

As you have mentioned it should work in before creating or inserting a new record you could update the fields so that it is proper but changing the record type I have tried searching and found a below developer forum thread that could help, can you try checking it out.

>>https://developer.salesforce.com/forums/?id=906F0000000BKn4IAG

I hope this helps and in case If this comes handy can you please choose this as best answer so that it can be used by others in the future.

Regards,
Anutej
Craig WoodmanCraig Woodman
Thanks Anutej,  While this can be completed with a trigger, I wanted to show the functions of the new before save flow actions, and answer a question that I could not find about these flows.  Hopefully people can see this and see both solutions.
This was selected as the best answer