AX 2012: Attach documents or creates notes through X++

AX 2012: Attach documents or creates notes through X++

MCP · Azure DevOpsYour delivery board, readable by an agentMCP · DataverseOne consent, and the data layer opensMCP · Dynamics 365 F&OConnecting F&O to an agent Microsoft hasn’t documented
Archive recovery note: the supplied Blogspot backup did not contain a separate saved page for this older entry. The text available in its archive/listing capture has been preserved and flagged for a later completeness check.
Came across a requirement to attach documents and create notes for a sales order after reading files from directories. Documents can be attached to a sales order manually from the following button. Code snippet to create notes or attach documents   DocuRef              docuRef;   DocuActionArchive    docuArchive;   SalesTable           salesTable = SalesTable ::find( "SO00001" );   Filename             fileName = @"C\Temp\SalesOrder.docx" ;   ttsbegin ;   // Code to create notes  docuRef.TypeId = 'Note' ;  docuRef.Name = "Sales order notes" ;  docuRef.Notes = "Checked Postcode: 2000, Select resident type" ;  docuRef.Restriction = DocuRestriction ::External;  docuRef.RefTableId = tableNum ( SalesTable );  docuRef.Ref...
Previous article← D365O - How to add financial dimension in grid
Discussion

Ask a question or leave feedback

This is a review interaction. The WordPress version will store, thread and moderate comments.

Thanks — submitted for moderation in this review.
Search the whole site · Ctrl/⌘ + K