Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Locking order editing of certain fields based on stage of workflow (or user input)

(0) ShareShare
ReportReport
Posted on by 138

We have created a more elaborate order workflow adding several custom fields for approvals by managers based on order value. These change a custom order status.

What I need is to lock some order fields (prevent editing) when a certain status is reached but keep others unlocked. For example editing products, prices, customer name is not allowed while shipping info can be edited.

*This post is locked for comments

  • Verified answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Locking order editing of certain fields based on stage of workflow (or user input)

    No, you can't

  • Hanno Profile Picture
    Hanno 138 on at
    RE: Locking order editing of certain fields based on stage of workflow (or user input)

    I don't need to lock individual fields. Isn't there a way to at least lock the edit for the whole grid through a business rule ?

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Locking order editing of certain fields based on stage of workflow (or user input)

    No, it should not allow user edit, please recheck your business rules. Also to get fields from order line items you need to query order line item entity based on order id and you need to do this using java script. You can't do this in business rules. Business rule will only allow you to use current entity fields.

    Hope it will help.

  • Hanno Profile Picture
    Hanno 138 on at
    RE: Locking order editing of certain fields based on stage of workflow (or user input)

    I tested your instructions by creating a business rule that checks a field and locks certain fields if it has certain values but it is still allowing users to change these fields (field security is enabled). Does the system give priority to field security profile over field locking business rules?

    Also, some fields like the order name field have security disabled and cannot be changed.

  • Hanno Profile Picture
    Hanno 138 on at
    RE: Locking order editing of certain fields based on stage of workflow (or user input)

    Thank you Mahender. This was helpful but how can I lock the fields in the product grid in the order form. They are not under Order/Fields

  • Verified answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Locking order editing of certain fields based on stage of workflow (or user input)

    Hi Mohamed,

    You can create custom fields (one or multiple, it will identify current workflow stage) which can be updated from workflow to get workflow stage and then you can have script on entity form/or business rule which can enable/disable fields based on the corresponding values from that custom fields.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans