Posts

Showing posts from 2020

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;   ...

Parameter System Design Pattern AX / D365 FO

Parameter System Design Pattern AX / D365 FO The parameter system design pattern holds static setup information for the modules in a company, such as information on the national currency, the posting method, and so on.  The parameter system should be set up as described in this topic.  The parameter record is automatically created by the system and has the following: ·           A parameter table ·           A parameter form ·           A parameter menu item Parameter Table There should be one parameter table per module. Parameter tables have a single record per company, holding the required parameters for the module. The record is cached. To enable the Found-cache, a key is defined. The following table shows the property setup of the table. Property Value Description ...

Split a string into a container in Microsoft Dynamics 365 FO using X++

Split a string into a container in Microsoft Dynamics 365 FO using X++ Some times when developing we need some string of which we only need a segment of the string, Code :         List  _list      =  new   List ( Types ::String);           Container      con;          ListIterator  iterator;          str                     String1;         ;         String 1         =  "Test-test1-test2 " ;         _list               =  Global ::strSplit(String1, "-" );     ...

Filter the data in between two dates using query in X++

Filter the data in between two dates using query in X++ QueryBuildRange  datefilter; public void init() {        datefilter = this .query().dataSourceNo( 1 ).addRange( fieldNum ( TableName ,Date));        datefilter.value(queryRange( 15\06\2020 , 20\07\2020 )); }

How to get workflow approvers list using x++

How to get workflow approvers list using x++ WorkflowTable            workflowTable; WorkflowVersionTable     workflowVersionTable; WorkflowElementTable     workflowElementTable; WorkflowStepTable        workflowStepTable; WorkflowAssignmentTable  workflowAssignmentTable; while   select  workflowAssignmentTable      join  workflowStepTable      where  workflowStepTable.RecId == workflowAssignmentTable.workflowStepTable      join  workflowElementTable      where  workflowElementTable.ElementId == workflowStepTable.ElementId      join  workflowVersionTable      where  workflowVersionTable.ConfigurationId == workflowElementTable.ConfigurationId   ...

Multi Select Lookup in SSRS Report in D365

Multi Select Lookup in SSRS Report in D365 Description:-   we will create multi select lookup in SSRS report so that we can select multiple data from lookup. Steps how to generate multi select lookup in SSRS report. Create contract class for that and create method for parameters. Contract Class: - [DataContractAttribute, SysOperationContractProcessingAttribute( classstr (TestUIBuilder))] class  TestContract  implements   SysOperationValidatable {      List   ListItemId; [DataMemberAttribute( "Item Id" ),AifCollectionTypeAttribute( "Item Id" ,  Types ::String),        SysOperationLabelAttribute( literalStr ( "Item Id" ))]         public   List  parmItemId( List  _ListItemId = ListItemId) {               ListItemId = _ListItemId;   ...