Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Select BPF based on field value

  • 1.  Select BPF based on field value

    GOLD CONTRIBUTOR
    Posted 10 days ago
    I have 2 simple Business Process Flows for Opportunities. When a new Opportunity is created the field "Opportunity Type" is always set to one of 5 values. I want one BPF to be selected for 3 of my 5 Opportunity Types and the other one to be selected for the other 2 Opportunity Types - at creation of the Opportunity.

    Is this possible (without JS)?

    ------------------------------
    Sissy Bottcher
    Business Process Innovation Specialist
    StudyPortals
    San Diego CA
    ------------------------------


  • 2.  RE: Select BPF based on field value

    TOP CONTRIBUTOR
    Posted 10 days ago
    Edited by Niels Lønberg 10 days ago
    @Sissy Bottcher

    You can achieve it by using a workflow.

    ------------------------------
    BR,
    Niels
    ------------------------------



  • 3.  RE: Select BPF based on field value

    GOLD CONTRIBUTOR
    Posted 10 days ago
    Thanks! Is it possible to delete the old one that was generated by default after the new one was applied? In other words - can i access the existing BPF through the workflow that runs on the Opportunity?

    ------------------------------
    Sissy Bottcher
    Business Process Innovation Specialist
    StudyPortals
    San Diego CA
    ------------------------------



  • 4.  RE: Select BPF based on field value

    TOP CONTRIBUTOR
    Posted 10 days ago
    @Sissy Bottcher

    You can't delete records using the internal Dynamics 365 workflow engine. However, you should be able to that using the 'Delete a record' action in Microsoft Flow.​


    ------------------------------
    BR,
    Niels
    ------------------------------



  • 5.  RE: Select BPF based on field value

    TOP CONTRIBUTOR
    Posted 9 days ago
    Will this work to change the process the user sees in the UI? I feel like I tried this, or something similar, earlier this year and while Dynamics would create the new process and associate it with the opportunity, the user would still see whatever was originally applied and would need to switch to the new process. Have you done this in practice with v9?

    ------------------------------
    Steve Platz
    Technical Lead, Commercial Excellence
    LORD Corporation
    Cary NC
    ------------------------------



  • 6.  RE: Select BPF based on field value

    Posted 5 days ago
    Hey Steve,

    We typically use JavaScript in this instance - the user selects a value from an option set and based on what they've chosen, the JavaScript sets the correct process which will update what the user sees in the various stages, etc. There are other ways to accomplish this task but we find JavaScript to be the fastest, especially for customer service reps that might have a customer on the phone working a case.

    Hope that helps!

    ------------------------------
    Tricia Desso-Cox
    Managing Director
    C5 Insight
    Charlotte NC
    ------------------------------



  • 7.  RE: Select BPF based on field value

    TOP CONTRIBUTOR
    Posted 9 days ago
    @Sissy Bottcher - Something else to consider is using Branching Logic in your BPF. https://docs.microsoft.com/en-us/dynamics365/customer-engagement/customize/enhance-business-process-flows-branching

    Since you have just 2 simple BPFs, this may work for you needs.​

    ------------------------------
    Aaron Back, MCSE
    Sr. Microsoft Dynamics 365 Consultant
    www.acemicrotech.com
    _______________________________________
    CRMUG Board Member
    CRMUG Chapter Leader - Cincinnati, Ohio
    ------------------------------



  • 8.  RE: Select BPF based on field value

    GOLD CONTRIBUTOR
    Posted 9 days ago
    The problem with branching is that I would need to have the branches come together again in the last stage. My need is actually only for only the last stage to be different - so exactly the one item that's not supported.

    However, I may have found another way yesterday that doesn't require branching. I have a field which is mandatory only in the last stage - but then for one specific Opportunity type I don't want the field to be mandatory. I realized that using Business Rules I can use BPF stage as a condition in combination with my field and then use "Set required" using a Business Rule instead. I didn't get it to work last night 100% yet, but it was late, so I will try it again today.

    ------------------------------
    Sissy Bottcher
    Business Process Innovation Specialist
    StudyPortals
    San Diego CA
    ------------------------------



  • 9.  RE: Select BPF based on field value

    SILVER CONTRIBUTOR
    Posted 5 days ago
    @Sissy Bottcher, you don't necessarily have to bring the branches together,we are using branches on a BPF that don't come together at the end ​



    ------------------------------
    Edrei Mpanduki
    CRM Technical Analyst
    Watsonville CA
    ------------------------------



  • 10.  RE: Select BPF based on field value

    GOLD CONTRIBUTOR
    Posted 5 days ago
    @Edrei Mpanduki, thanks! This is really strange that this seems to be possible for you but not for me. When I add a condition and an extra stage, the flow automatically looks like this for me: 

    Is there a step I'm missing?

    We are online on V. 9.1.0.7229

    ------------------------------
    Sissy Bottcher
    Business Process Innovation Specialist
    StudyPortals
    San Diego CA
    ------------------------------



  • 11.  RE: Select BPF based on field value

    SILVER CONTRIBUTOR
    Posted 5 days ago
    @Sissy Bottcher​, select the Stage (Opportunity New State in your case)and on the menu, select Connector and the Disconnect

    ------------------------------
    Edrei Mpanduki
    CRM Technical Analyst
    Watsonville CA
    ------------------------------



  • 12.  RE: Select BPF based on field value

    GOLD CONTRIBUTOR
    Posted 5 days ago
    Yay, that worked! Thank you so much!

    ------------------------------
    Sissy Bottcher
    Business Process Innovation Specialist
    StudyPortals
    San Diego CA
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role