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

Announcements

News and Announcements icon
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

I have the same question (0)
  • Verified answer
    Mahendar Pal Profile Picture
    45,095 on at

    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.

  • Hanno Profile Picture
    138 on at

    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

  • Hanno Profile Picture
    138 on at

    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.

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    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
    138 on at

    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 ?

  • Verified answer
    Mahendar Pal Profile Picture
    45,095 on at

    No, you can't

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans