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

Notifications

Announcements

No record found.

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

I have the same question (0)
  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi

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

    Hope this helps

  • hellosuresh Profile Picture
    539 on at

    Thanks for the response. Is there any workaround?

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    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

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

  • Bob Hatcher Profile Picture
    on at

    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

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans