After moving to new unified interface from legacy web interface.
We are moving one important feature Print Preview.
With print Preview we were able to print any record in pdf format.
I tried to find is there other way of new process given in Unified Interface. But to surprise No, there is no other way to print my record.
So we checked URL used in legacy web interface and try if it still working in Unified Interface or not. And yes, it worked !!.
Might in future release it will be removed and Microsoft will come with other way around for this feature.
So if you want of print any record use below URL.
https://<Your organization>.crm.dynamics.com/_forms/print/print.aspx?objectType=<Entity objectTypeCode>&id=<Record Id>
We can use XRMToolBox Metadata Browser plugin to get objecttypecode for our entity.
We can use link in JavaScript and created button of form and open this Url and it will work as expected.
function printPreview(id,objectTypeCode) {
var url = Xrm.Utility.getGlobalContext.getClientUrl() +
"/_forms/print/print.aspx?objectType=+"objectTypeCode+"&id="+id;
window.open(url);
}

No comments:
Post a Comment