Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Enable custom button on Home page of entity

(0) ShareShare
ReportReport
Posted on by 539

Hi I need to clone selected records in Home page. 

Clone button should be visible only on following conditions.

1. Only one record is selected.

2. attribute(<Option set>) value should be one of then following (2, 7, 10);

I used enable rule like below

<EnableRules>
<EnableRule Id="ctp.ctp_projectrequest.EnableRule3.EnableRule">
<OrRule>
<Or>
<ValueRule Field="ctp_requeststatus" Value="2" />
<SelectionCountRule AppliesTo="SelectedEntity" Minimum="1" Maximum="1" Default="false" />
</Or>
<Or>
<ValueRule Field="ctp_requeststatus" Value="7" />
<SelectionCountRule AppliesTo="SelectedEntity" Minimum="1" Maximum="1" Default="false" />
</Or>
<Or>
<ValueRule Field="ctp_requeststatus" Value="10" />
<SelectionCountRule AppliesTo="SelectedEntity" Minimum="1" Maximum="1" Default="false" />
</Or>
</OrRule>

</EnableRule>

somehow not working. Any idea?

I appreciate if some one helps. Thanks in advance.

*This post is locked for comments

  • Bob Hatcher Profile Picture
    on at
    RE: Enable custom button on Home page of entity

    Thank you @Scott for this response, the documentation says the restriction on ValueRules only applies to subgrid buttons. Since the button can either be on "Home", "Subgrid" or "Form" I would say the documentation is incorrect in this regard.

    https://msdn.microsoft.com/en-us/library/gg334317.aspx

  • hellosuresh Profile Picture
    539 on at
    RE: Enable custom button on Home page of entity

    Ok. got it. Thanks  for time spent to answer.

  • Suggested answer
    ScottDurow Profile Picture
    19 on at
    RE: Enable custom button on Home page of entity

    You would need to create a javascript custom rule that retrieves the records using the sdk web service - but I'd recommend against that for performance reasons. It would be better to check when the process is run and then stop as cancelled with a message to alert the user.

    Hope this helps

  • hellosuresh Profile Picture
    539 on at
    RE: Enable custom button on Home page of entity

    Thanks for the response. Is there any workaround?

  • Suggested answer
    ScottDurow Profile Picture
    19 on at
    RE: Enable custom button on Home page of entity

    Hi

    The valuerule will only work on the form. You will need to check the attribute value in JavaScript.

    Hope this helps

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
dkrishna Profile Picture

dkrishna 6

Featured topics

Product updates

Dynamics 365 release plans