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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Opportunity Close form

(0) ShareShare
ReportReport
Posted on by 288

pastedimage1609771323632v1.png

Customize the Opportunity Close form (Dynamics 365 Sales) | Microsoft Docs

Hi Guys, I see from the above link that we can now edit the opportunity close form. This is very handy, do you know if it is possible to make the Actual Revenue field a locked field or a read only field? As you prob already know, sales reps can add the details of the opportunity value into this field. What I have done is whenever a sales rep wants to close a piece of buisness I have the actual revenue field auto populate with the value seen in the total opportunity value field. If the sales rep wants to ammend the value then her/she should go back into the opp, make the changes at the opp level and close the opp then.

Without the ability to auto lock the actual revenue field, I have some sales reps that do not always enter the correct amount, so when it comes to billing, my actual rev figure says 20k but the finance team who work off the total opportunity value as it has the revenue breakdown see only 15k. They bill 15k and we have a hole of 5k in the reporting.

Is the easiest way just ensure the sales reps adds the right data each time?

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    The cool thing about customization of that form is that you can run JavaScript on it as well so all you need is to add a small piece of code that will lock the field. Check this post - www.dyn365blog.com/.../

  • Suggested answer
    prt33k Profile Picture
    6,907 on at

    Hi Jason,

    You first need to enable customization on opportunity close entity from the administration section as below:

    pastedimage1609813226564v1.png

    Once enabled, you can go to the 'Opportunity close' Quick Create form and set the Actual Revenue Field to Read-Only.

    pastedimage1609813503923v2.png

    This will now show the quick create form when you close the opportunity instead of the regular pop-up however the field will be read-only.

    pastedimage1609813580404v3.png

  • Jason Fleming Profile Picture
    288 on at

    Thank you Prateek,

    I completed the steps you showed but it is still not appearing correctly for me as per your screenshot. Here is a quick video showing you what I am seeing, perhaps there is something I am missing: www.awesomescreenshot.com/.../2279604

  • Jason Fleming Profile Picture
    288 on at

    Hi Andrew, thank you for your reply. Ive never run Java Script into Dynamics, Im not a coder and I am afraid that ill mess something up by doing it. Is it fool proof to add Java into the system.

    regards from a nervous administrator!! :-)

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Jason,

    No worries. That script will not mess anything up.

    It will be pretty simple something like:

    function onOppCloseLoad(executionContext){

    var formContext = executionContext.getFormContext();

    formContext.getControl("actualrevenue").setDisabled(true);

    }

    You can check this post as a reference - reenhanced.com/.../

  • Suggested answer
    prt33k Profile Picture
    6,907 on at

    So the only difference is that I didn't applied security to the 'Information' form and I made the same changes to the information form too. Can you also make the revenue field read-only on the Information form?

    The detailed steps are here too:

    Also Please publish the changes and clear the cache in the browser.

    ( docs.microsoft.com/.../customize-opportunity-close-experience )

  • Jason Fleming Profile Picture
    288 on at

    Hi Prateek,

    Apologies if I pronounced your name incorrectly.

    Im still not able to get the form to lock the field. Heres a quick video of what I am seeing: www.awesomescreenshot.com/.../2350980

    Regards

    Jason

  • Verified answer
    prt33k Profile Picture
    6,907 on at

    Hi Jason,

    I see you are using a custom app. Make sure you add the Opportunity Close entity in that app too. You can follow these steps:

    1. Go to your app from Setting Area:

    pastedimage1610472401607v1.png

    2. Select your app and go to App Designer.

    pastedimage1610472481798v2.png

    3. Check the Opportunity Close entity from the list.

    pastedimage1610472540638v3.png

    pastedimage1610472571017v4.png

    4. Save and Publish the changes. 

    Let me know if this works...

    Regards,

    Prateek

  • Jason Fleming Profile Picture
    288 on at

    Thank you very very much, I would not have figured that out on my own, your screenshots were super helpful.

    if I may ask you for one other question, relating to what is feeding the actual revenue field. it seems to populate find when closing as won, but if closing as lost it appears as zero. not sure why this is.

    www.awesomescreenshot.com/.../2366923

    Thanks again for your help.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans