Posts

Showing posts with the label Attaching a document to a purchase order

Attaching a document to a purchase order using x++ job (Runnable class) in Dynamics 365 for Finance and Operations

In previous post, the file attachment is done with the file selected by User from UI. Instead, if the file path is known, can directly pass same in x++ to attach to PurchTable record like below. class   Jobs {      public   static   void  main( Args  _args)     {          str                      imageToSave =  "C:\\invoice.jpg" ;          PurchTable               purchaseTable;         System.Net. WebClient     webClient;         System.IO. Stream         stream;          if  (imageToSave &&...