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:

  1. Open the Microsoft Dynamics NAV development environment.
  2. Select the page object.
  3. Open the page designer.
  4. Add the following part in a FactBoxArea:
    Type SubType Name Caption PagePartID

    Part

    Page

    DocMgtFactBox

    Document Management

    N108 Document Mgt. Factbox (In Properties)

    1. Go to the C/AL Editor and add the following local variable in the OnAfterGetCurrRecord() trigger:
      Name DataType Subtype

      DocMgtRecRef

      RecordRef

      1. 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.