How to increase the size of the attachment preview window for DocuView in D365F&O (Document preview/viewer resizing)?

  • We have a requirement for our client where they want the attachment preview window to be bigger than the default size. 
  • It is often difficult to fully view attachments due to the size of the preview window. This necessitates downloading and opening each attachment. This becomes cumbersome when there are multiple attachments. Increasing the size of the preview window would allow the user to properly view attachments without downloading them.
  • When I try to alter the height and width in the form design, it doesn't make any difference to the preview window. I see that the document displayed in the preview pane is dynamically rendered using the class DocuRefImageAnnotatorController.
  • I was facing this problem, and this is what I found to fix it as a workaround.

Solution:

You need to create an extension of createDocumentViewerControl method in DocuViewerContainer class and change the width and height mode to 1 (SizeToAvailabale).


Output:



Latest
Previous
Next Post »