Business Integration Solutions documentation
How to: Set up the fact box for drag and drop
You can add the Document Management fact box to virtually any page and use the drag-and-drop feature to archive and link documents to a record.
To add the Document Management fact box to a page:
- Open the Microsoft Dynamics NAV development environment.
- Select the page object.
- Open the page designer.
- Add the following part in a FactBoxArea:
| Type | SubType | Name | Caption | PagePartID |
|---|---|---|---|---|
| Part | Page | DocMgtFactBox | Document Management | N108 Document Mgt. Factbox (in Properties) |
- Go to the C/AL Editor and add the following local variable in the
OnAfterGetCurrRecord()trigger:
| Name | DataType | Subtype |
|---|---|---|
| DocMgtRecRef | RecordRef | - |
Add the following code in the
OnAfterGetCurrRecord()trigger://For Document Management DocMgtRecRef.GETTABLE(Rec); IF DocMgtRecRef.GET(DocMgtRecRef.RECORDID) THEN BEGIN CurrPage.DocMgtFactBox.PAGE.SetSource(DocMgtRecRef.RECORDID); CurrPage.DocMgtFactBox.PAGE.RefreshList; END;Compile the page object.
Open the page in RTC to check the result.