Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Is there any way to hide the Create new Quote Button on BPF.

(1) ShareShare
ReportReport
Posted on by 14
Hello Community, There is a requirement to hide the create button in BPF. So could you suggest to me some ways or some documentation links to hide it?
  • Verified answer
    Dengliang Li Profile Picture
    Dengliang Li Microsoft Employee on at
    Is there any way to hide the Create new Quote Button on BPF.
    Hi,
     
    This can be implemented via JavaScript.
     
    function onload(){
        //Get the HTML element of the BPF Opportunity Stage button.
        var opp_btn =window.top.document.querySelector("button[aria-describedby='MscrmControls.Containers.ProcessBreadCrumb-BPFStage_Description']");
        var nxt_btn;
        if(opp_btn!=null){
            //Determines if the obtained button is the Opportunity Stage button. If not then exit.
            if(!opp_btn.innerText.includes("Opportunity")){
                return
            }else{
                ListenToNextStageNextStage();
            }
        }else{
            //Continuously get the value of the Opportunity Stage button through callbacks until it is not null.
            setTimeout(onload,10);
        }
       
    function ListenToNextStage(){
        //Listen to the click event of the Opportunity Stage button.
        opp_btn.addEventListener("click",function fn() {
     
        //Get the Next Stage HTML element of the BPF Opportunity Stage.
        nxt_btn = window.top.document.getElementById("MscrmControls.Containers.ProcessStageControl-nextButtonContainer")
     
        if(nxt_btn!=null){
     
            HideCreateNew();
        }else{
     
            //Continuously get the value of the Next Stage button through callbacks until it is not null.
          setTimeout(fn,10);
        }        
        })
    }
     
    function HideCreateNew(){
            //Listen to the click event of the Next Stage button.
              nxt_btn.addEventListener("click",function fn1() {
     
                //Get the Create New HTML element of the BPF Opportunity Stage.
                var cnew_btn = window.top.document.getElementById("MscrmControls.Containers.ProcessStageControl-CreateNewContainer")
                     if (cnew_btn!=null) {
     
                        // Hide the Create New button
                         cnew_btn.style.display = "none";
                     }else{
     
                        //Continuously get the value of the Create New button through callbacks until it is not null.
                         setTimeout(fn1,10)
                     }
                 })  
    }
    }
     
    The final result is shown below.
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me .
     
    Best Regards,
    Dengliang Li
     
  • Suggested answer
    Abdul Wahab Profile Picture
    Abdul Wahab 12,077 Super User 2024 Season 1 on at
    Is there any way to hide the Create new Quote Button on BPF.
    Hi,
     
    As per my understanding, you need to prevent users from creating quotes. Don’t you think it would be achievable by just revoking privileges?
     
    Thanks
    Regards,
     
     
     

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,759 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,468 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans