Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

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

Posted on by Microsoft Employee

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

  • Community Member Profile Picture
    Community Member Microsoft Employee 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
    gdas 50,085 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans