Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Hiding Business Process flow in CRM 2016

Posted on by 190

Hi I am trying Hide the business process flow in CRM 2015 on Leads. If the form has HideBpf = Yes then i want it hidden else if not then show it.

I am using the code below 

function hideBusinessProcessFlow() {
Xrm.Page.ui.process.setVisible(false);
}

function showBusinessProcessFlow() {
Xrm.Page.ui.process.setVisible(true);
}

function showHideBusinessProcessFlow() {
if (Xrm.Page.getAttribute(“new_hidebpf”).getValue() == false) {
showBusinessProcessFlow();
}
else {
hideBusinessProcessFlow();
}
}

But get this error 

ReferenceError: showHideBusinessProcessFlow is not defined
at eval (eval at RunHandlerInternal (crm.xyz/.../ClientApiWrapper.aspx, <anonymous>:1:1)

  • Joana Pinto Profile Picture
    Joana Pinto 740 on at
    RE: Hiding Business Process flow in CRM 2016

    Hi,

    Can you show the whole js file? Because, in my experience, that error occurs with some syntax error. Like you having a comma on the beginning of the file, for instance. But in the code you are showing, everything seems ok.

    Regards,

    Joana

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Hiding Business Process flow in CRM 2016

    Your code has some copy paste issue from web , instead inside double comma   “ ”,  it would be " "  when you get value using attribute name in the condition. Always paste you code visual studio  before upload  into CRM to avoid this kind of error.

    Try with this -

    function hideBusinessProcessFlow() {

    Xrm.Page.ui.process.setVisible(false);
    }

    function showBusinessProcessFlow() {
    Xrm.Page.ui.process.setVisible(true);
    }

    function showHideBusinessProcessFlow() {
    if (Xrm.Page.getAttribute("new_hidebpf").getValue() == false) {
    showBusinessProcessFlow();
    }
    else {
    hideBusinessProcessFlow();
    }
    }

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans