web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Create workflow to unlock a field

(0) ShareShare
ReportReport
Posted on by 198

How can i create a workflow to unlock a read only field and then lock it again after changes have been done. 

I don't want to go through the process of using form editor unlocking field, publish changes etc

I have the same question (1)
  • Fasil Profile Picture
    30 on at
    RE: Create workflow to unlock a field

    Hi,

    Create a Business Rule for the entity and use lock/unlock Components.

    pastedimage1578592236734v1.png

  • Suggested answer
    Paul_Owen Profile Picture
    2,027 on at
    RE: Create workflow to unlock a field

    So you want anyone to be able to unlock it who is not admin? If so why have it read only?

    Create a yes/no field called unlock <name of lookup field> and a business rule that if unlock <name of lookup field> = yes unlock ELSE Lock.

    When creating the field enable field level security, add the users who you want to be able to unlock the lookup to the FLS profile (If everyone can theres no need for FLS) then they can just set the field to yes to unlock it and no to lock it, perhaps change the options to Lock/Unlock.

    Regards

    Paul

  • Community Member Profile Picture
    on at
    RE: Create workflow to unlock a field

    Again, one cannot affect the client from the server.  You could make a second form where the field is not read only.  To provide this user interaction you are seeking you could develop a button to execute javascript perform your task and reverse it onChange or onSave.

    Of course, if you are allowing folks to edit it, why is it read only in the first place?

  • r4vvm Profile Picture
    198 on at
    RE: Create workflow to unlock a field

    The lookup field is ready only on the form currently and it is blank, i wanted to create a workflow that will make it editable so that i can update it with the correct data and then lock it again. 

    I wanted to create a workflow that non-admin users who do not have access to form view can run to unlock the field populate with the correct data and then lock the field again. 

    hope this makes sense

  • Community Member Profile Picture
    on at
    RE: Create workflow to unlock a field

    Paul is correct.  Plugin assemblies and workflows are server-side.  To dynamically affect the user experience you must stay client side.  Use javascript (webresource) or business rule (PowerApp form developer)

    Secondly, a field on a form doesn't need to be unlocked to perform updates.  Form settings only control the human user.  Both client and server-side programming can set/change values on locked fields.  Here's a bad example, create an order.  The order number is a read-only field and yet the value gets autogenerated and filled in on save.

  • erhan.keskin Profile Picture
    2,253 on at
    RE: Create workflow to unlock a field

    I think the field is read-only on the form and you want to populate that field with something in WF (maybe dynamic value or static value, no matters), that is why you need to make it editable for a short time.

    If this is the case then,

    - make the field editable on the form

    - go to the WF and do what you need to do with that field

    - and come back to the form and make it read-only again and publish

    Regards,

  • Paul_Owen Profile Picture
    2,027 on at
    RE: Create workflow to unlock a field

    Are you saying the field is blank but when it contains data you want to make it uneditible? If so you can lock the field using a business rule.

    Regards

    Paul

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Create workflow to unlock a field

    Yes , this is the only way to unlock  from UI only. Please note if a field is read only in UI , you can update , create records with that filed  using SDK method call, plugin , workflow or from other source.

  • r4vvm Profile Picture
    198 on at
    RE: Create workflow to unlock a field

    So they only way to unlock the field is going through form view and un tick as read only then publish? 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 191

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 77 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans