Trigger plugin from CRM for multiple entities
<p>I've seen solutions for executing a plugin from a ribbon button. For example here: <a href="https://www.greenbeacon.com/insights/trigger-plugin-from-ribbon-button-using-custom-actions-in-dynamics-crm-2013/" rel="nofollow">https://www.greenbeacon.com/insights/trigger-plugin-from-ribbon-button-using-custom-actions-in-dynamics-crm-2013/</a>. However what I want to do is enable the execution of a plugin that does not relate to one entity in particular. In the JavaScript in that solution it includes this:</p>

<pre><code>requestXML += "            &lt;b:value i:type="a:EntityReference"&gt;";
requestXML += "              &lt;a:Id&gt;" + Xrm.Page.data.entity.getId() + "&lt;/a:Id&gt;";
</code></pre>

<p>However I don't want to limit it to one id. I want someone to be in an accounts view and click a button to perform a batch process, using the plugin, on all accounts (filtered within the C# code). Is there a way to do this?</p>