Copy Record Id of a row from Advanced Find

I have recently started using bookmarklets to improve productivity during CRM Development. There are plenty of bookmarklets that I use, and of these I quite frequently use these:

  1. Copy Record Id (
  2. Open Advanced Find (
  3. Open Default Solution (

Inorder to use the Copy Record Id bookmarket you’ll have to be in the record form. I found this inconvinient when I was viewing the results from Advanced Find. You can bookmarklet the below script to quickly extract the primary key of the selected row in the Advanced Find resultset.

javascript:var contentFrame=document.getElementById('contentIFrame0'),isError=false;if(contentFrame){var resultFrame=contentFrame.contentWindow.document.getElementById('resultFrame');if(resultFrame&amp;&amp;resultFrame.contentWindow){var selectedRow=resultFrame.contentWindow.document.querySelector('.ms-crm-List-SelectedRow');if(selectedRow){window.prompt('Copy to clipboard: Ctrl+C, Enter',selectedRow.getAttribute('oid'));}<br />else{alert('Please select a row to get the id');}}else{isError=true;}}else{isError=true;}<br />if(isError){alert('Unable to locate result frame to extract rowid');}<br />void 0;<br />

Here is the how it looks when you run the code on a row in the advanced find result.

I have tested this in the latest version of Firefox (33) and Chrome (38) and it works.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s