CDX Extensibility D365 MPOS


CDX Extensibility D365 MPOS



In one of our projects, we have a requirement to Add few fields to the customer group table and sync these fields with the MPOS channel database.

To fulfill this requirement we were following this link




Lets Begin


Step-1 
Create New straight table SLD_CustGroup and the same table we created in the Channel database as well.


Step-2 
Take Insert and update post handler of Cust group and perform insert and update on new table like below screenshot.










Step-3 
Create a new resource file to add all custom job information. Here is the template for the resource file and save it on any path.

<RetailCdxSeedData ChannelDBMajorVersion="7" ChannelDBSchema="ext" Name="AX7">
  <Subjobs>
    <Subjob Id="SLD_CustGroup" TargetTableSchema="ext" AxTableName="SLD_CustGroup" IsUpload="false">
      <ScheduledByJobs>
        <ScheduledByJob>1010</ScheduledByJob>
        <!--add existing sub-job to another job-->
      </ScheduledByJobs>
      <AxFields>
        <Field Name="CustGroup"/>
        <Field Name="SLD_PurchaseLimit"/>
        <Field Name="SLD_AllowSale"/>
        <Field Name="RecId"/>
      </AxFields>
    </Subjob>
  </Subjobs>
</RetailCdxSeedData>



Following is some information about tags of XML. You can find the detail on this Link

  • ChannelDBSchema – The extension schema that you created in the channel database.
  • TargetTableSchema – The extension schema that you created in the channel database to add your custom tables.
  • AxTableName – The table name.
  • IsUpload – A flag that determines whether the job is a rush job or a pull job. (In other words, the flag indicates whether you want to send data from Retail HQ to the channel database or pull data from the channel database to Retail HQ). The default value is false, which indicates that you're sending data from Retail HQ to the channel database.
  • ScheduledByJob – This resource file contains one or more sub-jobs.
  • Subjob – Each table is added as a sub-job, and each sub-job is scheduled by one or more scheduler jobs.
  • TargetTable – The name of the channel database table. This table is the target table that the push job or pull job must send data to. If a value isn't specified, the system assumes that name of the target table and the name of the source table are the same.

Step-4 Add a new resource file and associate the XML file with 







Step-5
Subscribe to the Delegate registerCDXSeedDataExtension of RetailCDXSeedDataBase in the new class and write the following code to load your newly created Resource file.


Add the resource like below 
For Example
   resources.addEnd(resourceStr(RetailCDXSeedData_CustGroup));

Step-6 
Now perform the build complete model and Sync database.

Step-7
To initialize or reinitialize the CDX module with the customized configuration, follow these steps:
  1. Go to Retail > Headquarters setup > Retail scheduler > Scheduler jobs > Initialize retail scheduler.
  2. In the dialog box that appears, select Delete existing configuration.
  3. Select OK to start the initialization.
    When the initialization is completed, the CDX scheduler jobs, sub-job definitions, and distribution schedules are updated by using the original RetailCDXSeedDataAX7 resource and the customized RetailCDXSeedData_CustGroup resource.

Step-8
For Verification search Scheduler jobs in AX and search bar job 1010.  You will find the sub job please check the below screenshot.



Step-9
Click on Sub job to verify that fields are appearing or not.


Feel free to contact me if you are facing any issues.


Data Source Join Types D365FO & AX 2012


Data Source join types


Form data source link type is a property of the form data source. We can add more than one table as a data source to the form. Those data sources should have the table level relation, So, then the developer not need to work on the coding part to find the related records. For example, if we create the order form, that order form has Student and student Attendance tables as form data sources. We can make part of both tables of the form data source and can make links as per requirement.



For Instance, We Created Two Tables.


  • Student
  • Student Attendance


Then Create a relation as per your requirement. I am using Normal relations.

Student

Student Attendance





Now create New Form and Add two Gird [StudentGrid] & [StudentAttendanceGird]




Let's begin


Passive Join Type




Passive form data source link type won't update the child data source automatically. For example, if we select the parent table order then order details child data source won't update. If we need to update the child data source we need to call the child data source to execute the query method by the program (code).


Active Join Type




Active link type updates the child data sources without any delay when you select the parent table record. When you deal with more records it will affect application performance.

Delay Join Type



Delay form data source link type is also same as active method the different is delay method won't update immediately when you select the parent record. It will update the child data source when you select the parent table, Ax uses a pause statement before update the child data source. 


Inner join Type



Inner join form data source link type displays the rows that match with parent table and child table. 


Outer join Type


Outer join form data source link type will return all parent records and matched child records. It will return all rows in the parent table. 

Exists Join Type



Exist join form data source link type return matched rows of the parent table. It behaves like an inner join but the difference is once the parent row is matched with child records then stops the process and updates in the grid, Ax won't consider how many records are in the child table for the parent row.

Not Exists Join Type



Not exist join form data source link type is a totally opposite method to exist join. It will return the not-matched parent records with child records.






Retail Server health Check

Retail Server health Check



If you have a Dynamics 365 for Operations with Retail deployment, it can be especially critical to be able to quickly check the health of the Retail Service (real-time service).


Life cycle Services (LCS) provides an Environment Monitoring portal for each service. 

Login to your LCS and select production server full details.

Click on Environment Detail.


Then select Retail Tab Tab and then click on retail Tab 


You will find the health status in graphical View...

A quick real-time service check can be performed by:
Opening a web browser especially Google chrome and Enter the below URL on the browser.

The only thing you have to change is the Server name with your environment URL

 https://SERVERNAME/healthcheck?testname=ping


if you want results in XML just add one more segment.

  https://SERVERNAME/healthcheck?testname=ping&resultFormat=xml 






Custom Data Entity D365FO




Custom Data Entity in few steps



Step -1
Create New Project and Create a Table like below 





Step-2 
Now add 4 fields. Name, Age, ClassName and RollNumber. After this create an index add two fields RollNumber and className.


Reference: Screenshot



Step-3 
Right-click on the table and navigate to Addin and select Create Data Entity.




Step-4  
if you are facing the error Natural key is not found like the below screenshot.




Step-5 
Go to Table and change the primary index with your newly created index.



Step-6 
Now perform step-3 again... Hope everything will work fine for you.






Extension Cases-

If you have the requirement to create a Systems Out of the box table entity and you are facing the same natural key error then there is another way to create a data entity of the required table.




As we all know we can't change the primary index in Table extensions.. check the below screenshot Primary index field showing disable.



Step-1 Copy any existing Entity 
Step-2 Remove data source, Fields, relations indexes, Methods and groups
Step-3 Add Invent Trans add the required field and make index


Step-4 set the properties like below images


Step-5 Now regenerate the staging table











Dimension Entry Control D365FO




Dimension entry control subpattern

SourceLink
This article provides information about the Dimension Entry Control sub pattern. This sub pattern is used when you have a group or tab page that uses the Dimension Entry control (DEC).

Usage

The Dimension Entry Control pattern is used when you have a group or tab page that uses the Dimension Entry control (DEC).

Wireframe



Lets Begin Example

First Create new project for demo purpose..

                                              

Step-1 - Create Custom Table

Step-2- Add Dimension Field and Extends with LedgerDefaultDimensionValueSet
Step-3- Make Relation with DimensionAttributeValueSet





Step-4-  Create New Form & Display Menu items and set the Form Name in the object property of the menu Item.



Step-5- Create New menu extension if you required and drag your Display menu item where you want to display.



Step-6-  Now Open the Form you created previously and drag the newly created table in the data source of your form.

Step-7- Now Add the Tab control and one Tab page with tab control and apply the Dimension Entry control pattern and set the properties like below screenshot.


Now Add two groups as per pattern requirement and set the properties 

First Group Properties
  • Frame Type =None
  • Hide if Empty =No

Second Group Properties
  • Arrange Method=Vertical
  • Auto Declaration=Yes
  • Hide if Empty =No



Now perform the build & sync 

Now login to D365FO and Open the newly created Form


Now Create new Record and enjoy Dimension Entry Control :)




Please feel free to contact me, if you are facing any issue to implement the above blog.



VM Development server using LCS


VM Development server using LCS


Microsoft Azure using Microsoft Dynamics Lifecycle Services (LCS). This topic applies to deploying a development environment on Dynamics 365 for Finance and Operations


Let's Begin

Use this procedure to deploy a development environment on Azure using LCS.
Open your LCS project and click on the Hamburger icon of LCS Menu Bar and click on cloud hosted environment. 



Once the page is loaded then click on Add button to start the environment provision process.




Select Environment Type



There are two types of topology available on LCS, Demo, and DEVTEST.
In Our Demo, we select DEVTEST Topology.



In the very next step, you will find two options Build and Test and Develop Machine.

Build and Test

Select this option when you want to provide the environment for the Build machine.
There are only a few steps difference between both environments is only the configuration steps of build agent and TFS.

Important 

Microsoft highly recommends to don't use Build & Test for development purpose.


DETEST


This topology uses only for development purposes..

If you faced the below error, means the Azure ARM connector not define on your LCS.





Click on the hamburger icon again and go to the project set to add Azure connector.



Now select the Azure connector Tab and click on Add button, check the below screenshot.



Fill the required fields 

  • Name 
  • Azure Subscription 
  • Azure Tenant Domain

Please check the below screenshot.



If you don't know your Azure Subscription Id then login to Azure Portal with Admin accounts, you also have the rights of Administrator on Azure AD.



Search Subscription in the search bar or you can find the path with the help of the below screenshot.


Click on Add and follow the MS ARM on-boarding blog. 



After completion of Onboarding ARM. GO to project setting Add Azure Connector and fill the required fields and click Next.

If your ARM Onboarding process is successfully completed a role will be shown to you. if this role is not showing to you then click on the Azure portal and follow the ARM instructions again.

If everything is showing as expected then click on next.




Click next Again and select your Azure region and click connect.


After completion of the Azure connector, Click on the hamburger Icon and click on cloud-hosted environment again.


Then follow the steps I mentioned at the start of the project. once you come on the below screen Enter the Environment Name.



for Advance configuration setting for Environment click on Advance settings.. below information will be shown to you. 



Select the configuration as per your requirement and click on close


Select the Machine Size and click on Next to finalize the provision. It will take 5 to 6 working hours in the environment configuration. 

I personally prefer the D4V2 Machine for development you can change as per your requirement.

Feel free to contact me if you are facing issues in the implementation of the above blog.






Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...