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 :
Microsoft Dynamics CRM (Archived)

How to enable / disable a button based on record type (eg email, phone) selected in Activity Pointer subgrid ?

(0) ShareShare
ReportReport
Posted on by

Hi,

I am able to enable / disable a button based on record type (using enable rules with SelectedControlSelectedItemReferences parameter) but it only works when I select the record by clicking on the CHECKBOX to the left of the record. It doesn't work when I select the record by clicking anywhere but the CHECKBOX  it doesn't work ( it works for the first record selected but when some other record is selected the state of the button remains the same i.e based on the  first  record that was selected). How can I solve this issue, and make it to work regardless of where I click to select the record ?

Thanks

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: How to enable / disable a button based on record type (eg email, phone) selected in Activity Pointer subgrid ?

    Hi Goutam,

    1)

    I created a Custom Button and created just one enable rule for it with same functionality, it also behaves in the same way ( i.e only works when clicked on Checkbox ). So ordering of enable rule won't affect it.

    Also, SelectedControlSelectedItemReferences works for multiple record types as well as multiple records selected.

    2)

    As a workaround I am thinking of prompting the user that a particular record type (eg. Phone Activity )if selected to be marked as canceled, CANNOT BE CANCELED USING CANCEL BUTTON.  But I cannot find the Javascript file associated with the button's ACTION which is :-

    /_static/_common/scripts/RibbonActions.js

    and the function name is

    Mscrm.GridRibbonActions.deactivate

    Where can I find this script file so that I can edit it ?

  • gdas Profile Picture
    50,091 Moderator on at
    RE: How to enable / disable a button based on record type (eg email, phone) selected in Activity Pointer subgrid ?

    Hi Bob,

    Could you please ordered your enable rule at the first position. Seems some other rule are overwriting .

    For my understanding enable rule should work even if you are selecting using check box or anywhere you clicked. No matter how you have selected . When your rule is working selecting check box or selecting by row click ?

    In addition SelectedControlSelectedItemReferences  rules properties will work for only one selected record it will not work for multiple selected record.

    Let me know 

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans