Have you ever encountered having to update a field in a workflow only to realize that the field is read-only on the form and therefore also read-only in your workflow designer?
To work around this issue you’re left with a few options:
- Switch between forms and choose a form that does not have the field, or has the field as editable. Since the workflow designer uses your ‘Sticky’ Form, you will then be able to update the field.
- Go to your Form customizations, uncheck Field is read-only, publish, go back to your workflow, update your workflow, go back to your form and set the field read-only again… ouch!!
[bra_divider height=’10’]
Today I faced the exact same issue. I needed to update the currency field of the campaign entity, which is read-only in the workflow designer. We didn’t have alternative forms and because it was a user owned workflow to be created in a production environment, I couldn’t change the behavior of the field and perform a publish. It was pretty obvious neither of the solutions above were viable in my situation. So I searched for a workaround… and I found one! Here’s how you do it:
- Open your workflow designer in Chrome, and open up the Update Step which contains the field you want to update. [bra_divider height=’10’]
- Hit F12 to start the Developer Tools [bra_divider height=’10’]
- Click the arrow Icon in the Dev Tools. This allows you to select HTML elements on your Update Page.
[bra_divider height=’10’]
- Select the Currency Lookup Image (in my case), or the field you wish to update.
[bra_divider height=’10’]
- Now in your DevTools, you need to make the following changes to the HTML of the img tag:
- Go back to the Update Page. Even though the lookup will still look read-only, it is now clickable and you can enter a value as you would otherwise!
[bra_divider height=’10’]
- Select the value you desire and press Save and close.[bra_divider height=’10’]
Congratulations, you just updated a read-only lookup field through the Workflow Designer interface! Well done!
Keep in mind that this little trick is unsupported and might not continue to work in future versions of CRM.
Did you find this info useful? Don’t hesitate to leave a comment!
A Better solution.... do not change the field to read only in form designer.... change the field to read only from form_onload event.
Hi Marr, That could indeed work as well, but wouldn't be as much of a Low Code approach ;-). Business Rules could also work indeed.
Does this work for simple text fields as well ?
So I've finally found the time to verify this. It's even easier for simple textfields, Arsenico. It suffices to find the correct input attribute and remove the disabled="disabled" tag completely. Works like (an unsupported) charm!
Hi Arsenico, it should work for simple text fields too. I'll try and post the exact code needed for simple text fields later on!