web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Multi-select Fields in Business Rules

(1) ShareShare
ReportReport
Posted on by 288

Hi Guys,

Currently Multi-select fields are not available to use in business rules or workflows. If I am wrong on this please say so.

I use nulti-select fields to track the reasons why a customer might leave us. However, I cant make this a required field when a customer is tagged as lost because it cant be used in a business rule. My users dont always remember to add this in and so its leaving a hole in my data. 

Looking for ideas around this. First off I thought of adding a new field called "have you added a reason" make this a yes no field and make it required, therefore it makes the user think and reminds them to add in the data, however, it leaves it open to just populating this new field to yes without actaully adding in a reason.

Other suggestions around this are very welcome.

Regards

Jason

I have the same question (0)
  • Verified answer
    meelamri Profile Picture
    13,216 User Group Leader on at
    RE: Multi-select Fields in Business Rules

    Hi Jason, 

    For the moment, multi-select fields are not supported by the Business rules.

    It will be possible to implement your need with a JavaScript code.

  • Jason Fleming Profile Picture
    288 on at
    RE: Multi-select Fields in Business Rules

    Thanks Mehdi,

    I cant code and havent geared myself up to try and understand the javascript import etc, if this is a pretty easy task to complete I would like to try.

    Regards

    Jason

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Multi-select Fields in Business Rules

    Hi Jason,

    You can use following synax to set the field requirement level:

    formContext.getAttribute(arg).setRequiredLevel(requirementLevel)

    In my test, there are two fields in the account form, i want to make the 'Reasons' field required when the 'IsLost' field id yes.

    pastedimage1646357908046v2.pngpastedimage1646357821361v1.png

    You can refer following steps to know how to set it:

    (1)JS code:

    function setFiedrequirementasrequired(executionContext)
    {
        // Getting formContext 
        var formContext = executionContext.getFormContext();
        // Get value of IsLost 
        var isLost = formContext.getAttribute("custom_islost").getValue();
        // Check condition if custom_islost field value is Yes, Reasons set field requirements as required.
        if (isLost == 1)
        {
            //setting Reasons field requirement as required.
            formContext.getAttribute("custom_reasons").setRequiredLevel("required");
        }
    }

    (2)Go Settings > Customizations > Customize the system > Entities > Account > Forms to open one main form:

    a.Click 'Form Properties' to open the dialog, then click ' Add' button:

    pastedimage1646358754895v3.png

    b.Click 'New' button:

    pastedimage1646358828902v5.png

    c.Create a new web resource:

    pastedimage1646359107976v6.png

    d.Navigate to the form page, add it.

    pastedimage1646359334719v8.png

    e.Set Event Handlers

    pastedimage1646359511471v9.png

    f.Save and Publish.

    (3)Result:

    pastedimage1646360035770v10.pngpastedimage1646360679000v11.png

    Maybe you need provide more details to make me edit the js code to meet your needs.

    (1)What is the entity for customer?

    (2)How to tag the customer as lost?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 186

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 130 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans