Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested answer

Enabling button while fields are not null

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Team,

We want to disable resolve button till few fields are not filled. We are trying to do through ribbon workbench but unable to see result. Could you help us to write rules and where to write those rules like in enable section or display section. We are using Ribbon Work Bench first time so we are unaware about exact steps to do it.

Could you please help us?

Thanks,

Mayur

  • Suggested answer
    Pratik Jog Profile Picture
    Pratik Jog 95 on at
    RE: Enabling button while fields are not null

    Hi Mayur,

    U can create a javascript as below,

    function CheckFieldValues(primaryControl)

    {

    var formContext = primaryControl;

    var Field1 = formContext.getAttribute("your_field_name").getValue();

    var Field2 = formContext.getAttribute("your_field_name").getValue();

    .

    .

    .

    .var Fieldn = formContext.getAttribute("your_field_name").getValue();

    if(Field1 != null && Field2 !=null && ... Fieldn !=null)

    {

    return true;

    }

    else

    {

    return false;

    }

    }

    Refer this Javascript on the enable rule and click on the add parameter and select CRM paramter and from the dropdown select PrimaryControl (which is the first parameter on the function).

    On the onchange event of all your required fields refresh the ribbon by follwing javascript

    function refreshRibbon(executionContext)

    {

    var formContext = executionContext.getFormContext();

    formContext.ui.refreshRibbon();

    }

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 Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,356 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans