Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Making BPF fields required but they behave like form required fields

Posted on by 7,392 User Group Leader

Hi,

I'm using D365 JS Xrm.getControl("header_process_new_fieldname").getAttribute().setRequiredLevel("required"); to make my field on the BPF as required.

But, in this case, the required field on the BPF behaves like a required field on the form. It doesn't let me save the form at all (whereas, a required BPF field will let you save the form and will restrict you only from proceeding to the next stage).

Is this the default behavior? Or am I missing anything? Also, what are the workarounds.

Thanks in advance.

  • Priyesh Profile Picture
    Priyesh 7,392 User Group Leader on at
    RE: Making BPF fields required but they behave like form required fields

    Even though with that. The form wouldn't let me save the field on the Active Stage and it asks me to fill in the required field which in on the BPF.

    Does your solution also take care of this?

  • Suggested answer
    G Kawinski Profile Picture
    G Kawinski 380 on at
    RE: Making BPF fields required but they behave like form required fields

    You can check what stage the BPF is in using the client API (docs.microsoft.com/.../getstatus), and only make the field required when the BPF is in the correct stage.  You can attach to the stage change event to re-trigger the logic (docs.microsoft.com/.../onprocessstatuschange).  

  • Priyesh Profile Picture
    Priyesh 7,392 User Group Leader on at
    RE: Making BPF fields required but they behave like form required fields

    I was wondering if there's any alternative to this. Conditional branching would make my BPF bloat too much to achieve too little.

  • Priyesh Profile Picture
    Priyesh 7,392 User Group Leader on at
    RE: Making BPF fields required but they behave like form required fields

    It allowed me to make it required. But the behavior was such that it didn't behave like a BPF required field (only restricting user when someone tries to click on Next Stage), instead, it restricted me from saving form entirely pointing that my BPF field needs to be filled in.

    I'll take a look at what you suggested though.

    Thanks :)

  • Suggested answer
    TonyN Profile Picture
    TonyN 695 on at
    RE: Making BPF fields required but they behave like form required fields

    It looks like the sdk only allows you to check if the BPF field is required but not update it. You will have to use conditional branching.

    www.inogic.com/.../make-the-business-process-flow-fields-to-be-required-conditionally

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

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