Bookmarklet to copy FetchXml

This is basically an extension of this post -> The bookmarklet below displays fetchxml that was used to display the results.

javascript:var fetchXml;if(frames[0] && frames[0].document.getElementById('FetchXml')){fetchXml=frames[0].document.getElementById('FetchXml').value;} else if(frames[1] && frames[1].document.getElementById('FetchXml')){fetchXml=frames[1].document.getElementById('FetchXml').value;} if(fetchXml){window.prompt('FetchXml',fetchXml);} else{alert('No FetchXml query found');} void 0;

Run this bookmarket from the Advanced Find results page and it will display the FetchXml in a dialog window for copy pasting.


Sometimes I just want to develop a starting point fetchxml using advanced find and work on it more using FetchXml Builder or Fetch Tester 3000. This bookmarklet saves me the hassle of exporting the fetchxml file, and copy pasting the result into the appropriate tool.


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