Got a requirement which needs to get advance find fetch xml on a ribbon button.
Here is the script to get advance find FetchXml on ribbon button click
var fetchXml = document. all.namedItem("FetchXml").value;
Use the advance find xml accordingly.
Hope helps :)
Note: Above script completely unsupported.