Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

Business Process Flow choices column

(0) ShareShare
ReportReport
Posted on by 89

Hello,

 

I understand that choices columns are not supported with Business Process Flows. In those situations where choices are absolutely required what have others done to make the users aware that the choices selection was required for the BPF?

 

The column is set to required so the built-in prompt is there.

 

I wonder if the user experience can be improved by including a message in the BPF?

 

Thanks,

Norm

 

 

Categories:
  • AnuragT Profile Picture
    34 on at
    Re: Business Process Flow choices column

    This is Possible via Plugin Assembly and Steps. I used following code: 

    First declared variables: 

     var formContext = executionContext.getFormContext();
     var casecategory = formContext.getAttribute("afm_casecategory").getValue();
     var arrStatus = formContext.getAttribute("statuscode").getOptions();
     var InProgress = { value: 1, text: "In Progress" };
     var MissingBackup = { value: 2, text: "Missing Backup" };
     var poNeeded = { value: 3, text: "PO Needed" };
     var NeedClarification = { value: 4, text: "Need Clarification" };
     var ManuallyPosted = { value: 5, text: "Manually Posted" };
     var InApproval = { value: 6, text: "In Approval" };
     var Rejected = { value: 7, text: "Approval Rejected" };
     var sapPosted = { value: 8, text: "SAP Posted" };
     var sapError = { value: 9, text: "SAP Error" };

     Then defined criteria:

    if (casecategory == 747120001) //Accounting
     {
     formContext.getControl("header_statuscode").addOption(InProgress);
     formContext.getControl("header_statuscode").addOption(MissingBackup);
     formContext.getControl("header_statuscode").addOption(poNeeded);
    
     formContext.getControl("header_statuscode").addOption(NeedClarification);
     formContext.getControl("header_statuscode").addOption(ManuallyPosted);
     formContext.getControl("header_statuscode").addOption(InApproval);
     formContext.getControl("header_statuscode").addOption(Rejected);
     formContext.getControl("header_statuscode").addOption(sapPosted);
     formContext.getControl("header_statuscode").addOption(sapError);
     }
     else {
     formContext.getControl("header_statuscode").addOption(IP);
     formContext.getControl("header_statuscode").addOption(Submitted);
     formContext.getControl("header_statuscode").addOption(New);
     formContext.getControl("header_statuscode").addOption(WaitingforDetails);
     }

    Then Built Plugin.

    Once Plugin is built, then I used XRM Toolbox Plugin Registration tool.

     

    As a result, I see Choices in BPF as below: 

     

    AnuragT_0-1691505090470.png

     

  • stormin_30 Profile Picture
    89 on at
    Re: Business Process Flow choices column

    I like this configured approach and thank you for the suggestion!

  • stormin_30 Profile Picture
    89 on at
    Re: Business Process Flow choices column

    This is excellent and thank you. 

  • Verified answer
    Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on at
    Re: Business Process Flow choices column

    Hi @stormin_30 ,

     

    Another option I have done here is to add a Yes/No field that says something like "Choices Column Completed" or whatever the message is you like 😀and then set this as a required field to complete in the stage you would like completed.  They would have to physically set this value to Yes to move to the next stage.  

     

  • Ram Prakash Profile Picture
    5,179 Super User 2025 Season 1 on at
    Re: Business Process Flow choices column

    Hello @stormin_30,

     

    Yes 100%

     

    function onLoad(executionContext){
    
    var formContext = executionContext.getFormContext();
    var activeStage = formContext.data.process.getActiveStage();
    var stageName = activeStage.getName();
    if(stageName =="CurrentStageName"{
    formContext.ui.setFormNotification("Please Make Sure you are in THIS STAGE", "WARNING", "ERRORSTAGE");
    }
    }

     

    You can follow my Youtube Link on How to use JS in Model Driven App : https://www.youtube.com/watch?v=x8kYNCkikgs&t=14s

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

  • stormin_30 Profile Picture
    89 on at
    Re: Business Process Flow choices column

    Hi @rampprakash,

     

    Thanks for responding, I appreciate it. Will this approach work with Model-Driven apps?

     

    Thanks,

    Norm

  • Ram Prakash Profile Picture
    5,179 Super User 2025 Season 1 on at
    Re: Business Process Flow choices column

    Hello @stormin_30,

     

    Try setting Form Notification based on the Stage

     

    formContext.ui.setFormNotification(message, level, uniqueId);

     

    So that User will be notified based on the BPF Stage

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 19

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 15 Super User 2025 Season 1

Overall leaderboard

Featured topics