I want a screen window in my Flow, that displays lead data to validate. If the interacting user changes values, I want these values to overwrite what's in the lead sobject variable, and to update in SF.

currently, I create variable for each data field I want to validate, and upon 'Next' I assign these values to the sobject variable back, and do update.

It looks like this

enter image description here

Is there a simpler way? one that does not require these back and forth copies.

To look more like this

enter image description here

  • I usually work with SObjects, as I find it more comfortable than creating single variables per field datum. – Saariko Aug 11 '15 at 12:39
  • Sorry, re-read your question and saw that :P. – Kasper Aug 11 '15 at 12:40

Yes. This is very easy to do. I would advise that this is only good if you have a very simple 'validation'. If your validation has tons of different paths, then it can often be better to go down the assigning variables route.

So... getting to the answer:

On the Screen, each 'field' that you have added needs to have a 'default value' set to the field that is on the Object. That means, you need to have a Record Lookup BEFORE the Screen so that you can pre-populate it with the correct values (unless you're doing all that in your VF Page OR URL).

Now, so we have those fields, they are now populating our lovely Screen! Awesome! (however, this doesn't work as easy with picklists).

Okay, so now when you're on your Record Update, you want to scroll down just a bit further from the variables section, and look for your Screen Input Fields this is where you'll be able to grab the user entered data. IF nothing changed, THEN you'll have the same data as before. IF something did, THEN it'll put that new data in there.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.