0
votes

I would like to have a field automatically be populated with something I define in a workflow. Currently I have the workflow running upon record creation, however the field is only populated AFTER the user saves the record for the first time.

How can I use a workflow to populate that field before the user saves the form?

1

1 Answers

4
votes

You can't. Workflows function on the server-side, but you're asking about populating a client-side field before the server is contacted. Moreover, workflows are triggered asynchronously, which by definition means the record has to be created in advance.

You'll need to either attach a JavaScript function to the OnSave event, or trigger the population of the field in a pre-validation or pre-operation .NET plugin. I suppose you could use a Dialog as well, but that would require user input. See the below links for more detail on the differences between plugins, workflows, and dialogs.