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 :
Customer experience | Sales, Customer Insights,...
Answered

Unable to Lock/Unlock ispriceoverridden Toggle Button on Order Product Form

(1) ShareShare
ReportReport
Posted on by 8

Hello Everyone,

I'm facing an issue with the ispriceoverridden toggle field on the Order Product form in the Sales Model-Driven App.

I have implemented custom JavaScript to lock/unlock fields based on users' security roles. The logic works correctly for all other fields, but it does not work for the ispriceoverridden toggle button.

So far, I have:

 


  • Verified that my JavaScript is being executed correctly.


  • Confirmed that the lock/unlock logic works for other fields on the form.


  • Checked for any custom Business Rules on the Order Product entity, but there are none.


  •  
 

I'm wondering if there is any out-of-the-box Business Rule, system behavior, or special handling for the ispriceoverridden field that could be overriding the JavaScript behavior.

 

Has anyone encountered a similar issue or knows why this field cannot be locked/unlocked programmatically?

 

Any guidance would be greatly appreciated.

 

Thanks in advance!

 

Sai Venkat

Categories:
I have the same question (0)
  • 11manish Profile Picture
    962 on at
    I suspect you're encountering out-of-the-box Sales pricing engine behavior rather than an issue with your code. The ispriceoverridden field is a special system field used by Dynamics 365 Sales pricing logic, and Microsoft scripts can override client-side setDisabled() calls. I would test whether the control is being re-enabled after form load and consider enforcing the restriction through server-side validation or by reverting unauthorized changes rather than relying solely on locking the toggle.
  • CU18061856-0 Profile Picture
    7 on at
    This field is not a normal Boolean field. It is tightly connected to the Dynamics 365 pricing calculation process. It is used as a trigger for pricing behavior, not just for storing a value. The Order Product entity has a CalculatePrice operation, so pricing is handled by the system, not just by the field and because of this :
    JavaScript does not reliably work for ispriceoverridden
    e.g:
    formContext.getControl("ispriceoverridden").setDisabled(true);
    This only affects the UI for a short time , when pricing recalculates (like product change, quantity change, save, etc.):
    The system re-evaluates the field and It can override your JavaScript changes
    what you can try:
    Use a plugin (Pre-operation) -> best way to enforce rules
    Try setTimeout in JavaScript ->not recommended, but you can test if delay helps
  • Verified answer
    ManoVerse Profile Picture
    1,281 Super User 2026 Season 1 on at
    This field is not a normal Boolean field. It is tightly connected to the Dynamics 365 pricing calculation process. It is used as a trigger for pricing behavior, not just for storing a value. The Order Product entity has a CalculatePrice operation, so pricing is handled by the system, not just by the field and because of this :
    JavaScript does not reliably work for ispriceoverridden
    e.g:
    formContext.getControl("ispriceoverridden").setDisabled(true);
    This only affects the UI for a short time , when pricing recalculates (like product change, quantity change, save, etc.):
    The system re-evaluates the field and It can override your JavaScript changes
    what you can try:
    Use a plugin (Pre-operation) -> best way to enforce rules
    Try setTimeout in JavaScript ->not recommended, but you can test if delay helps
  • Suggested answer
    CU06081200-0 Profile Picture
    8 on at
    Thanks everyone for your responses 
  • ManoVerse Profile Picture
    1,281 Super User 2026 Season 1 on at
    @CU06081200-0 can you please mark the answer as verified so that this thread would be closed and help other community members to find the verified answer 

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 > Customer experience | Sales, Customer Insights, CRM

#1
Hamza H Profile Picture

Hamza H 142 Super User 2026 Season 1

#2
Nagaraju_Matta Profile Picture

Nagaraju_Matta 128

#3
11manish Profile Picture

11manish 119

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans