Posts

Showing posts from December, 2025

How to get user to whom workflow is assigned using X++ in Dynamics 365 Finance & Operation

  public WorkflowUser isWorkflowApprover(Common _common) { WorkflowTrackingStatusTable workflowTrackingStatusTable; WorkflowTrackingTable workflowTrackingTable; select firstonly RecId from workflowTrackingStatusTable join User from workflowTrackingTable order by WorkflowTrackingTable.CreatedDateTime desc where workflowTrackingTable.WorkflowTrackingStatusTable == workflowTrackingStatusTable.RecId && workflowTrackingStatusTable.ContextRecId == _common.RecId && workflowTrackingStatusTable.ContextTableId == _common.TableId && workflowTrackingTable.TrackingContext == WorkflowTrackingContext::WorkItem; return workflowTrackingTable.User; }

How to get any Report Name from Print Management in D365 FO x++

   private PrintMgmtReportFormatDescription getReportFormatDescription(PrintMgmtDocumentType _docType)   {       PrintMgmtReportFormatDescription printMgmtReportFormatDescription;       RecId printMgmtDocInstanceRecId = PrintMgmtDocInstance::getPrintMgmtDocRecId(           0,           0,           PrintMgmtNodeType::Sales,           _docType,           PrintMgmtDocInstanceType::Original);       if (printMgmtDocInstanceRecId)       {           PrintMgmtReportFormat printMgmtReportFormat;           PrintMgmtSettings printMgmtSettings;           select firstonly Description, SSRS from printMgmtReportFormat               exists join printMgmtSettings           ...

Generate Public URL of Attachment expose to 3rd parties without authentication

  internal final class TestClassV2 {     /// <summary>     /// Class entry point. The system will call this method when a designated menu      /// is selected or when execution starts and this class is set as the startup class.     /// </summary>     /// <param name = "_args">The specified arguments.</param>     public static void main(Args _args)     {         int64 _recId=22565437142; // refer to a record present in inventable  eg released product         DocuRef docuRef;         EcoResProductImage ecoResProductImage; // there can be multiple images against a product so we only creating url of image that is by default         select firstOnly docuRef     join ecoResProductImage         where ecoResProductImage.DefaultImage == NoYes::Yes         ...

get product image in D365 FO x++

  public str getProductImage(ItemId _itemId)     {         str                 imageBase64;         InventTable         inventTable = InventTable::find(_itemId);         EcoResProduct       product;         Common              firstRecord;         Common              secondRecord;         product             = EcoResProduct::find(inve...