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

Announcements

No record found.

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

  • Suggested answer
    ScottDurow Profile Picture
    25 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
    25 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans