Notifications
Announcements
No record found.
Hi all
I need to get selected record on button's click. How can I get selected record id?
Thank You
*This post is locked for comments
You can use Xrm.Page.data.entity.getId(); if you want to get the current record ID, and if you want to get the selected record ID in a sub grid then refer to :
https://woodsworkblog.wordpress.com/2014/01/27/crm-2013-adding-an-on-change-event-to-a-sub-grid/
Hi Abed Haniyah
I am getting this error
Where am I wrong? May you please tell me?
Refer this:
vikramxrm.blogspot.sg/.../read-subgrid-records-ms-crm-2013-using.html
https://ribbonworkbench.uservoice.com/knowledgebase/articles/129783-pass-the-currently-selected-grid-row-s-to-a-custo
Hi Abdul Wahab,
You can use javascript to get the selected record id.
var id =Xrm.Page.data.entity.getId();
Try this code :
function GetRecordID()
{
var Rid = Xrm.Page.data.entity.getId();
if(Rid == null)
alert("Id is empty");
}
else
alert(Rid);
To get selected records Ids of grid on the button's click, all you have to do is to use “SelectedControlSelectedItemIds” Parameter in Action.
Note: This will work in case of custom buttons only.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2