1. Create a contract class to define the container of the item Notes: Do not use a list. It may cause the error: “no metadata class defined for data contract object” when the function’s running. Code: [DataContractAttribute] public class ABC_MaterialBalanceContract { container conItem; [DataMemberAttribute, SysOperationControlVisibilityAttribute(false)] public container parmConItem(container _conItem = conItem) { conItem = _conItem; return conItem; } } 2. Create a service class to process extends SysOperationServiceBase 3. Create a controller class to call the service class (step 2) extends SysOperationServiceController Code: class ABC_MaterialbalanceController extends SysOperationServiceController { protected void new() ...
Architecture of the development environment
- Get link
- X
- Other Apps
By
Tho Nguyen
-
This article will help you get an overview of the architecture of the development environment.
The architecture of the development environment resembles the architecture of the cloud instance. It also includes the software development kit (SDK), which consists of Visual Studio development tools and other components.
Source control through Team Foundation Server or Visual Studio Online enables multiple developer scenarios, where each developer uses a separate development environment. Deployment packages can be compiled and generated in a development environment and deployed to cloud instances by using LCS. The following diagram shows how the key components interact in a development environment.
D365 FO Environments for new implementation
- Get link
- X
- Other Apps
Popular posts from this blog
Build HTML and send email in D365 FO with X++
By
Tho Nguyen
-
1. Generate HTML Note: If you want to add an attribute to a tag, you must follow the below rule: Use addAttribute before Next use renderBeginTag Exp: htmlTxtWriter.addAttribute("colspan", "9"); htmlTxtWriter.renderBeginTag('th'); htmlTxtWriter.renderEndTag(); Result: <th colspan = 9> public void runNotificationExPicking() { Query q; QueryRun qRun; QueryBuildDataSource qbds,qbdsProdJournalBOM; QueryBuildRange qbr,qbrJournalName,qbrJournalJournal; InventTable inventTable; ProdTable prodTable; ...
How to customize electronic reporting in D365
By
Tho Nguyen
-
1. Overview This Article provides an overview of how to customize electronic reporting (ER) from scratch. 2. Basic customize. 2.1 Custom reporting configurations Overview configurations Data Model Data Mapping configurations Format 2.2 Data Contract Extends ERFormatMappingRunBaseContract Specifies the data contract that should be used to run the configured ER format. 2.3 UI builder class Extends SysOperationAutomaticUIBuilder The provided code looks up only ER formats that contain a data source of the Data model type that refers to the data model by using the Root definition. Notes: ERCustomerModel = name of the data model. ERCustomerDataContainer = name of definition in Model to data source mapping (in image 2) 2.4 Data provider class Used to run the configured ER format. 2.5 Report service class Extends SysOperationServiceBase Ca...
Batch parallelism or multithreading in Dynamics 365 for Finance and Operations
By
Tho Nguyen
-
1. Create a contract class to define the container of the item Notes: Do not use a list. It may cause the error: “no metadata class defined for data contract object” when the function’s running. Code: [DataContractAttribute] public class ABC_MaterialBalanceContract { container conItem; [DataMemberAttribute, SysOperationControlVisibilityAttribute(false)] public container parmConItem(container _conItem = conItem) { conItem = _conItem; return conItem; } } 2. Create a service class to process extends SysOperationServiceBase 3. Create a controller class to call the service class (step 2) extends SysOperationServiceController Code: class ABC_MaterialbalanceController extends SysOperationServiceController { protected void new() ...
How to create and run the Runbase batch class in D365
By
Tho Nguyen
-
In this article, you will learn how to create and run a batch class that extends RunBaseBatch in D365. A batch class is a class that can be scheduled to run periodically or on demand on the Application Object Server (AOS) or a client. A batch class must extend the RunBaseBatch class, which provides the methods and properties that the system needs to run the class as a batch job. Steps to create a batch class: 1. Open the Application Object Tree (AOT) in a development workspace and create a new class under the Classes node. Give it a meaningful name, such as MyBatchClass. 2. In the class declaration, add extends RunBaseBatch to indicate that your class inherits from the RunBaseBatch class. 3. Override the run method of the RunBaseBatch class and write your business logic in it. This is the method that will be executed when the batch job runs. For example, you can write code to query and update some records in a table. 4. Override the pack and unpack methods of the RunBaseBatch class and...
How to Enable/Disable a Form Button with X++
By
Tho Nguyen
-
To enable or disable button in form based on current selected record status through event handlers. Create a button or choose a button to enable / disable in form. Go to Form/Datasource/Events/OnActivated, right click and select "Copy event handler for OnActivated method". Create new class NNT_WHSWorkTableFormEventHandlers class NNT_WHSWorkTableFormEventHandlers { [FormDataSourceEventHandler(formDataSourceStr(WHSWorkTableListPage, WHSWorkTable), FormDataSourceEventType::Activated)] public static void WHSWorkTable_OnActivated(FormDataSource sender, FormDataSourceEventArgs e) { #define.BTNNAME('YourButtonName') WHSWorkTable whsWorkTable = sender.cursor(); FormRun element = sender.formRun(); FormControl YourButton = element.design(0).controlName(#BTNNAME); YourButton.enabled(w...
How to create and run the Runbase class in D365
By
Tho Nguyen
-
In this article, you will learn how to create and run a class that extends RunBase in D365. Step by step, please see the below code: Create a class and extend runbase. In this case, i create the class with name as "SumCustomerTransaction". For example: Here is the code for extending the runbase class: You can copy the code here: public class SumCustomerTransaction extends RunBase { DialogField dialogAccount; DialogField dialogFromDate; DialogField dialogToDate; CustAccount custAccount; FromDate fromDate; ToDate toDate; #DEFINE.CurrentVersion(1) #LOCALMACRO.CurrentList ...
Customize the standard excel template in D365FO
By
Tho Nguyen
-
1. Create extensions for data entities: LedgerJournalLineEntity and LedgerJournalHeaderEntity. 2. Create extensions for the staging table: LedgerJournalLineCDSStaging, LedgerJournalHeaderCDSStaging 3. If you want to add dimensions to Excel templates In Microsoft Visual Studio, click Dynamics 365 > Addins > Add financial dimensions for Odata. Type the name of the Financial dimension in the Dimension Name column. This should be the exact name of the financial dimension. Select the Model that has your extensions. It should be above the AppSuite layer. Click Apply Add 2 extensions, DataEntity into the project: DimensionSetEntity.DimensionIntegration, DimensionCombinationEntity.DimensionIntegration. You must keep the extension name "DimensionIntegration" for the project to work properly. 4. Build and synchronize the project. 5. Open the standard Excel template, make modifications, and save it in a local path. In our example, for the General Ledger Journal Excel template (...
Difference between InMemory and TempDB tables in D365 F&O
By
Tho Nguyen
-
The difference between InMemory and TempDB tables in D365 F&O is: • InMemory tables are stored in the active memory of the tier where the process is running, either the client or the server tier. TempDB tables are stored in the SQL Server database as physical tables. • InMemory tables are instantiated when the first record is inserted, and are de-allocated when the record buffer goes out of scope or is set to null. TempDB tables are instantiated when the table object is created, and are dropped when the record buffer goes out of scope. • InMemory tables can be created by setting the TableType property of the table to InMemory, or by using the setTmp method on a record variable, or by setting the SourceTableTemporary property of a page. TempDB tables can be created by setting the TableType property of the table to TempDB. • InMemory tables can be joined with regular tables, but cannot have foreign keys, indexes, or methods. TempDB tables can be joined with regular tables, and can ha...
How to create and run a batch class that extends RunBaseBatch in D365
By
Tho Nguyen
-
In this article, you will learn how to create and run a batch class that extends RunBaseBatch in D365. A batch class is a class that can be scheduled to run periodically or on demand on the Application Object Server (AOS) or a client. A batch class must extend the RunBaseBatch class, which provides the methods and properties that the system needs to run the class as a batch job. Steps to create a batch class: 1. Open the Application Object Tree (AOT) in a development workspace and create a new class under the Classes node. Give it a meaningful name, such as MyBatchClass. 2. In the class declaration, add extends RunBaseBatch to indicate that your class inherits from the RunBaseBatch class. 3. Override the run method of the RunBaseBatch class and write your business logic in it. This is the method that will be executed when the batch job runs. For example, you can write code to query and update some records in a table. 4. Override the pack and unpack methods of the RunBaseBatch class and...
How to apply a package in LCS Dynamics 365 F&O
By
Tho Nguyen
-
Step 1: Start Visual Studio using Run as administrator. Step 2: Click on the Dynamic 365 menu and select Create Deployment Package from the Deploy menu item. Step 3: Select your model and set the output path of the model and press Create . Step 4: Log in to LCS then navigate to your project. Click on the hamburger icon and select Asset Library . Step 6: Select the software deployable package and click on + icon to add your custom package. Step 6: Enter the package name and description, and click on Add file button to upload your deployable package. Click on browse and select package then click on upload and press Confirm . Step 7: You can find the package in the tab of software deployable tab Once the package is uploaded successfully. Once LCS marks the package as valid . Step 8: Go to your environment. Now click on Maintain and select apply update . Step 9: Select your package and click on apply . Step 10: Package deployment will start in a few seconds. LCS will show you...
Comments
Post a Comment