Business Integration Solutions Documentation
How to: Setup Factbox for Drag and Drop
You can add Document Management fact box, virtually, to any page and use the Drag and Drop feature to archive and link documents to a record.
To add 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:
Copy Code ``` //For Document Management DocMgtRecRef.GETTABLE(Rec); IF DocMgtRecRef.GET(DocMgtRecRef.RECORDID) THEN BEGIN CurrPage.DocMgtFactBox.PAGE.SetSource(DocMgtRecRef.RECORDID); CurrPage.DocMgtFactBox.PAGE.RefreshList; END; </td> </tr> </tbody> </table> </div> 7. Compile the page object. 8. Open the page in RTC to check the result.
- Add the following code in the OnAfterGetCurrRecord() trigger:
- Go to the C/AL Editor and add the following local variable in the OnAfterGetCurrRecord() trigger: