How to Import Records from Excel Using X++ Code in D365FO

  How to Import Records from Excel Using X++ Code in D365FO   Include the below namespace in X++ code it will requires to import Excel. Using System.IO; Using OfficeOpenXml; Using OfficeOpenXml.ExcelPackage; Using OfficeOpenXml.ExcelRange;   In addition to the basic reference, include (Directory and DirectoryUpgrade Packages) X++ Code: Using System.IO; Using OfficeOpenXml; Using OfficeOpenXml.ExcelPackage; Using OfficeOpenXml.ExcelRange; class ReadExcel {   public static void main(Args _args)    {     Int id;     Str Name;      System.IO.Stream stream;       ExcelSpreadsheetName sheet;              FileUploadBuild fileUpload,fileUploadBuild;       DialogGroup dialogUploadGroup;       FormBuildControl formBuildControl;       Dialog dialog=new Dialog("Excel Import using dialog");       dialogUploadGroup=dialog.addGroup("@SYS54759");       formBuildControl=dialog.formBuildDesign().control(dialogUploadGroup.name());    

Open a URL in web browser from D365 FO using X++ code

Open a URL in web browser from D365 FO using X++ code

Today, we will see how we can open a URL in web browser from D3fO using X++ code. 

It is achieved using Browser class having method navigate(). 

It has three parameters from which only first is mandatory:  
1.      string      – URL you want to browse.
2.     Boolean  – It is used to specify url should be open in same tab or new tab
3.     Boolean  – Prompt a dialog to exit the current page.

Add new Runnable Class from Project in VS and include below code.

class openBrowserJob
{    
    /// <summary>
    ///     Runs the class with the specified arguments.
    /// </summary>
    /// <param name = "_args">The specified arguments.</param>
    public static void main(Args _args)
    {
        Browser browser = new Browser();
        browser.navigate(“https://selvadynamics.blogspot.com/”, true, false);
    }
}

Comments

Popular posts from this blog

D365 FO: REFRESH CALLER FORM DATA SOURCE FROM A CLASS X++

Customize SSRS report using extension in D365FO

CREATE AND POSTING PURCHASE ORDER THROUGH X++ DYNAMICS AX