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

Announcements

News and Announcements icon
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

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

I have the same question (0)
  • Suggested answer
    Pratik Jog Profile Picture
    95 on at

    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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 51 Super User 2026 Season 1

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#3
Nagaraju_Matta Profile Picture

Nagaraju_Matta 50

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans