Hello,
Can any one suggest javascript code to print record in D365 which will be called on custom button.
i have tried with https://waleedbinafzal.medium.com/print-preview-in-dynamics-365-new-unified-interface-d62ce9732b9c but its not working .
Hello,
Can any one suggest javascript code to print record in D365 which will be called on custom button.
i have tried with https://waleedbinafzal.medium.com/print-preview-in-dynamics-365-new-unified-interface-d62ce9732b9c but its not working .
Hi partner,
You can try the code of the previous partner, if it still doesn't work, I think it may be the following situation now.
The code is calling the /_forms/print/print.aspx page, which uses the old legacy web client infrastructure. This infrastructure will be removed when Microsoft finishes transferring all remaining dependencies from the legacy web client (i.e., advanced settings, etc.). So, the workaround may have stopped working.
You can consider Word templates or reports according to your own needs or vote on Microsoft's "ideas" to express your opinion.
https://docs.microsoft.com/en-us/power-platform/admin/using-word-templates-dynamics-365
https ://docs.microsoft.com/ zh-cn/powerapps/maker/model-driven-apps/add-reporting-to-app
Hi Krishna,
Can you try with this ?
function PrintPreview() {
window.open(Xrm.Page.context.getClientUrl() + “/_forms/print/print.aspx?allsubgridspages=false&formid=” +
Xrm.Page.ui.formSelector.getCurrentItem().getId() + “&id=” + Xrm.Page.data.entity.getId() +
“&objectType=” + Xrm.Page.context.getQueryStringParameters().etc);
}
I hope that's helpful for you
André Arnaud de Cal...
293,274
Super User 2025 Season 1
Martin Dráb
231,947
Most Valuable Professional
nmaenpaa
101,156
Moderator