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 :
Microsoft Dynamics CRM (Archived)

CRM 2015 - Changing Required Level of Field Located in Business Process Flow Not Working as Expected

(0) ShareShare
ReportReport
Posted on by 67

Here is the Scenario:

1) Create two fields for any entity ... for example: "New Person" (Yes/No field) and "Person Name" (text field) and make sure fields ARE NOT REQUIRED. DO NOT add this field to any form.

2) Create a Business Process Flow for the entity and add both those fields to a stage and make sure the fields ARE REQUIRED. Make sure you have additional stages after this stage.

3) Create a business rule that if "New Person" equals No then make "Person Name" field NOT REQUIRED (else keep it required)

4) Save and Publish all changes

5) Go to entity that has the business process flow and go to the stage that has the two fields you created. You will notice, as expected, that the two fields are required to move to the next stage.

6) Set "New Person" value to "No". You will notice, as expected, that the red "*" next to "Person Name" disappears making the field NOT REQUIRED.

7) Click the Next Stage Button to try and move to next stage. You'll notice you are unable to move to next stage. You get a warning saying "You have to complete the required steps before you can advance".

Is this a glitch in MS Dynamics? What's the use of business rules if they don't work in business process flow fields?

Note: I've tried with JavaScript as well, and the result is the same.

The scenario above only works if you initially set the "Person Name" field to NOT REQUIRED instead of required in the Business Process Flow.

Any feedback you can provide will be greatly appreciated.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    tpeschat Profile Picture
    4,930 on at

    Hi

    To set Business process flow fields to required via javascript, you need to prefix them with "header_process_" like explained in the following article:

    www.google.at/.../amp

    Hth Thomas

  • Suggested answer
    Gary Letter Profile Picture
    1,267 on at

    It looks like the only condition that should prevent moving to the next stage is if it is a New Person and the Person Name is not entered.  Try the following:

    1. Clear the "Required" checkboxes from both fields in the Business Rule.
    2. Modify the Business Rule to test for the condition described above.
    3. Add an "Else" clause that changes the Person Name field back to "Not Required" if the condition is not met.

    5707.BusinessRule.PNG

  • Suggested answer
    ScottDurow Profile Picture
    23 on at

    The problem that you are seeing is that business rules are only loaded for the fields that are in the current business process flow step - so when you change steps the business rules are not in effect.

    I have got around this in the past by adding the fields to the main form as well - so that the business rules are always active.

    Hope this helps

  • Eric Tobin Profile Picture
    67 on at

    Thomas, I know that. As I said it doesn't work either. The red "*" which represents a required field does disappear, but for some reason CRM still thinks the field is required and throws the warning message I wrote above.

  • Eric Tobin Profile Picture
    67 on at

    Sorry , my previous post was directed at Thomas.

  • Eric Tobin Profile Picture
    67 on at

    Gary, that doesn't work (it's exactly what I've done). Try to reproduce my scenario with the steps I've stated above and you'll see.

  • Eric Tobin Profile Picture
    67 on at

    Scott, the business rule is in effect. In my scenario the fields are in the first stage, therefore they are in effect when you first load the form. You can see this by the fact that the red "*" which represents a required field disappears/reappears when I select the applicable value. For some reason when I click the "Next Stage" button, CRM still thinks that field needs to be filled out even when the required "*" is gone and it throws the warning message I wrote above.

    Try it yourself and you'll see what I'm talking about.

  • Karuna Karan Profile Picture
    1,214 on at

    Eric,

    Business rules will have no effect if the fields are not in the form, it is as simple as that. Since you have made the two fields in the BPF as required, and the fields are not in the form, the biz rule fails to do its action.

    My simple solution to this is..

    Put both the fields in the form under a section, and set the section visibility to NO in form properties. This way your biz rule will run.

    Regards

    KK

  • Eric Tobin Profile Picture
    67 on at

    That is one of the first things I tried and it doesn't work. If you'd try it yourself you'd see what I am talking about. I even tried putting the field visible on the form as well and even though the required red "*" disappears meaning the field is not required, the business process flow still thinks it is.

    Stating that the business rules have no effect in BPF and that it fails to do it's action is completely false. The red "*" representing the field being required DOES DISAPPEAR. For testing Purposes, and to prove that you are wrong, I changed to rule to Show/Hide the field instead of setting required/not required, and the field was shown/hidden accordingly in the BPF.

    There really seems to be a glitch/bug with BPF not recognizing a field as no longer being required.

    As I've mentioned several times in my post, please try it yourselves and you will see what I am talking about.

  • Eric Tobin Profile Picture
    67 on at

    I have attached images to illustrate the problem (This is an extremely simple scenario as in real life, I'd be changing the Required level of numerous fields and/or visibility along with it.):

    Business Process Flow:

    CRMNewPersonSetToNo.png

    Business Rule to Change Required Level:

    CRMBusinessRule.png

    Initial Screen Load of Entry:

    CRMInititalScreenLoad.png

    New Person value set to "No"... required level changes as expected:

    CRMNewPersonSetToNo.png

    Attempt to go to Next Stage fails even though field is no longer required:

    CRMNextStageNotWorking.png

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans