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
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:
I like this configured approach and thank you for the suggestion!
This is excellent and thank you.
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.
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
Hi @rampprakash,
Thanks for responding, I appreciate it. Will this approach work with Model-Driven apps?
Thanks,
Norm
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
mmbr1606
22
Super User 2025 Season 1
stampcoin
19
Michael E. Gernaey
15
Super User 2025 Season 1