From July 9th till 13th we will be at #MSInspire. See you there!

How to Configure Document Management in MS Dynamics AX 2012

How to Configure Document Management in MS Dynamics AX 2012
24 Oct 2014

Document management or document handling is a key feature in any ERP. Dynamics AX 2012 also provides full featured document management or document handling functionality, such as the ability to create document templates and reuse them for generation of records like purchase orders, project budgets, service orders, sales orders, etc.; and file attachment – for attaching files to a record in the form of PDF, MS Word docs or Excel sheets.

In this post, we’ll walk through the steps you need to take in order to configure Document Management in MS Dynamics AX 2012. We’ll also look at some some sample code that depicts how to attach documents to a record in Dynamics AX 2012.

Given below are the recommended guidelines or steps for how to configure document management in MS Dynamics AX 2012. These need to be executed in sequence.

  1. Activate document management
  2. Specify a document archive directory
  3. Specify a numbering sequence for your documents
  4. Specify the file types you intend to use
  5. Configure the integration with office add-ins (optional)
  6. Create or import document type
    • Configure document management for SharePoint (optional)
    • Configure document categories (optional)
  7. Specify content type
  8. Specify document management settings in AIF

How to Configure Document Management in Dynamics AX 2012

Given below is some sample code for attaching a document with a particular record in Dynamics AX 2012 that’ll help get you started.

[AifDocumentCreateAttribute, SysEntryPointAttribute(true)] public boolean createAttachment(RefRecId refRecId, RefTableId refTableId, str refCompanyId,
str docuDesc, str docuNotes, str docuTypeId, str fileName)
{

DocuRef docuRef;
DocuValue docuValue;
recid docuValueRecId;
DocuActionArchive archive;
boolean saved;
;

saved = false;
ttsBegin;

// Save DocuRef
docuRef.clear();
docuRef.RefRecId = refRecId;
docuRef.RefTableId = refTableId;
docuRef.RefCompanyId = refCompanyId;
docuRef.Name = docuDesc;
docuRef.Notes = docuNotes;
docuRef.Restriction = DocuRestriction::Internal;
docuRef.Name = docuDesc;
docuRef.TypeId = docuTypeId;;
docuRef.insert();

// Add archive File
saved = archive.add(docuRef, ‘File Path’);

if(saved)
{
// Save DocuValue
docuValue.initValue();
docuValue.FileName = savedFileName;
docuValue.FileType = savedFileExtension;
docuValue.insert();

// Update DocuRef and DocuValue References
docuRef.ValueRecId = docuValue.RecId;
docuRef.update();
}

ttsCommit;
return saved;

}

And that’s it!

About Folio3 Dynamics Services

FDS (Folio3 Dynamics Services) is a dedicated division of Folio3 that specializes in Microsoft Dynamics AX, Dynamics CRM, Dynamics NAV and Dynamics GP based development, customization and integration services. Our main focus is on Enterprise Mobility. We firmly believe that opening up Microsoft Dynamics AX and other products to iOS Android, Windows 8 and Windows Phone users will have a huge impact on organizational agility and productivity.

If you have a Dynamics AX based development project you’d like to discuss or would like to know more about our Dynamics AX development services, please get in touch with us.

Share

saboorawan

Latest From Our Blog
7 Ways Dynamics 365 Finance and Operations Boos...
dynamics 365 finance
November 9, 2018
Introduction Launched by Microsoft, Dynamics 365 ERP is one of the most effective for businesses today. It is perfect to save the time, effort and ...
Read more
The Ultimate Guide to Dynamics 365 HR Payroll P...
dynamics hr payroll
October 30, 2018
For any business, irrespective of its size, payroll processing is one of the most important functions. Payroll processing is a method through which...
Read more
An Ultimate Guide to Dynamics 365 Business Cent...
microsoft dynamics business central
September 24, 2018
Microsoft Dynamics Business Central can capably support all your financial processes, whereby enabling smooth integration with supply chain, operat...
Read more
Contact Form