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

Cardinality and RelatedTableCardinality table relation property in D365 FO

 Cardinality and RelatedTableCardinality table relation property in D365 FO

Cardinality is the property which explains about nature of the relationship between two tables on the related table.

For example:

ZeroOne: You will select this, provided child Table/related table can either have no record or have only one related record (Fetch Mode is 1:1).

ExactlyOne: You will select this, provided child Table/related table can have only one related record (Fetch Mode is 1:1). 

ZeroMore: You will select this, provided child Table/related table can either have no record or more than one related record (Fetch Mode is 1:n).

OneMore: You will select this, provided child Table/related table can have more than one related record (Fetch Mode is 1:n).

Cardinality specifies how many instances of SalesLine row can be related to a single instance of SalesTable row.ZeroMore means that for every sale order, there can be zero, or more sales lines related to it. If the business requirement dictates that you need to have at least one sales line to be able to create a sales order, the Cardinality would be OneMore (1:*).


RelatedTableCardinality specifies how many instances of SalesTable row can be related to a single instance of SalesLine row. ExactlyOne means that every sales line should belong to one and only one sales order.

Comments

Popular posts from this blog

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

Passing Args from one Form to another Form in dynamics AX

CREATE AND POSTING PURCHASE ORDER THROUGH X++ DYNAMICS AX