Extend for Drag-and-Drop Document Attachments to Any Table and Page

Home/Extend for Drag-and-Drop Document Attachments to Any Table and Page

Extend for Drag-and-Drop Document Attachments to Any Table and Page

You are here:

DocXtender (2.1.7982.2 and newer) provides support using event subscribers to extend its drag and drop functionality for document attachments to any table and page in Business Central. The pattern follows the similar approach to extend the standard Business Central functionality for Document Attachments. For completeness you may want to extend the standard functionality at the same time as extending the DocXtender functionality.

Extend DocXtender for drag and drop Document Attachments to any table and page by completing the following:

  1. Create a page extension.
  2. Add Document Attachment FactBox to the page extension.
  3. Add the three (minimum) required procedures for event subscribers to specify the table and filters associated with the related record for the Document Attachment FactBox:
    • EventSubscriber(ObjectType::Codeunit, Codeunit::”IWX DocXtender”, ‘OnGetCustomRecRefFromDocAttachment’, ”, false, false): sets the table for the related record when attaching documents using the drag and drop functionality.
    • EventSubscriber(ObjectType::Codeunit, Codeunit::”IWX DocXtender”, ‘OnAfterOpenForRecRef’, ”, false, false): sets the filters for the related record when opening the attached document for DocXtender customizations.
    • EventSubscriber(ObjectType::Page, Page::”Document Attachment Details”, ‘OnAfterOpenForRecRef’, ”, false, false): sets the filters for the related record when opening the attached document for standard functionality.
    • EventSubscriber(ObjectType::Page, Page::”Document Attachment Factbox”, ‘OnBeforeDrillDown’, ”, false, false): (optional) sets the table for the related record when attaching documents using standard functionality.

Extending DocXtender Example

The following provides an example on how to extend DocXtender for the Released Production Order page:

  1. Create a page extension.
  2. Add the standard Document Attachment FactBox:
  1. Add procedures for the event subscribers:
    1. Set the table for the related record when attaching documents using the drag and drop functionality:
    1. Set the filters for the related record when opening the attached document for DocXtender customizations:
    1. Set the filters for the related record when opening the attached document for standard functionality:
    1. Set the table for the related record when attaching documents using standard functionality:
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?

Leave A Comment

Go to Top