Tuesday, December 31, 2019

D365FO new vertical/ product development

When you complete your brainstorming and designing of new vertical or product in Dynamics 365 for Finance and Operations, the next phase is development. You cannot directly jump on Visual Studio and start coding, there are many steps that you need to do, here are some of them:

  1. Create Azure DevOps project
    Azure DevOps is the new name of previously know TFS (Team Foundation Server). It's basically code repository service with advanced versioning features. I personally prefer Azure DevOps to GitHub, but for D365FO you cannot make your project on GitHub even if it's your favorite. You need to create a project for your product in Azure DevOps; It's free for upto 5 users.
  2. Specify VMs
    In D365FO, like other good renowned software, you need to have different VMs for different purposes. The most needed ones in initial phases are one development VM per developer, one code merge VM (build VM) and one test VM. You may also use your build VM for testing purposes.
  3. Build the Models
    Till this step you may already have a model diagram with you on paper, Microsoft Visio and any other tool. You may also look in this article of how I drew mine,
    https://microsoftdynamix.blogspot.com/2019/12/d365fo-new-vertical-product-architecture.html

    Model is technical classification of elements in your product. All the developments or extensions will be done inside these models.
  4. Start coding
    Now you can connect your Azure DevOps with your Development VM and start coding. Remember to go through Microsoft best practice documents in every blog they share, they help a lot in keeping the product up to date and in high performance.
Best of luck. Thank you!

Monday, December 30, 2019

D365FO new vertical/ product architecture

Hi,

It's common for ISVs to launch their products based on Dynamics 365 for Finance and Operations. Internally they call those products 'Verticals'. There are different stack holders indulged in this process from brainstorming of features till the testing and launching the product. In this blog, I will describe the process of designing the new product in technical perspective. We assume that brainstorming of the product has already been completed. The following steps are most important in this phase as I faced:

  1. Identify elements
    The first step after brainstorming is identifying as much elements as you. By elements I mean anything you can count as user, screen, process or even condition.
  2. UML diagram (Unit)
    Draw UML diagram of each user separately. Try to think as much deep as you can to cater corner cases. I believe that though brainstorming is done while deciding the features, it is a never ending process which shall keep going on till the final steps or even the product is launched to bring improvements in the product. Likewise, drawing drawing UML diagram for each user separately will make your mind think centrally in that perspective and identify processes in its perspective. The diagram below is an example.
  3. Complete UML diagram (Module diagram)
    Now connect those unit diagrams, it is a good idea to draw them on paper with pencil so you can rectify them easily. Module diagram will represent your product in business perspective. It will show the flow and dependency of objects on each other. The diagram below is an example.
  4. Model diagram
    Model is the technical classification of elements. Once every element is identified in Module diagram, you need to look how you can divide them with respect to development. In D365FO it is not good idea to put all your element in one cumbersome model. It is Microsoft best practice to make relevant models. The diagram below is an example.

Thank you!

Thursday, October 17, 2019

D365FO LCS The authentication process was not successful. Please contact your system administrator.

While connecting to create a repository The authentication process was not successful. Please contact your system administrator.



Even if try to add new repository it will give error, like in following screenshots.

                         

                        
                       

                       



You can solve it with following steps:



  1. Remove affected tokens
    The database may have affected key you need to take backup of data of this table and delete the records with following query.





  2. Add new repository
    Now you can add new repository without error

        

         

 it will take you to login page where you will give login Id and password, or will directly sign you in if you are already signed in.

         


Hope it solves your problem. You may comment your problem as well. I faced some other issues as well which I solved but forgot to take screenshots.






Thursday, September 19, 2019

D365FO Failed to generate the user token for Dynamics Lifecycle services on behalf on user {*}. Please contact your system administrator.


While trying to connect to LCS for creating repository I got following errors:

Failed to generate the user token for Dynamics Lifecycle services on behalf on user {4E41*******38B}. Please contact your system administrator.


Even if try to add new repository it will give error, like in following screenshots.

                         

                        
                       

                       



You can solve it with following steps:



  1. Remove affected tokens
    The database may have affected key you need to take backup of data of this table and delete the records with following query.





  2. Add new repository
    Now you can add new repository without error

        

         

 it will take you to login page where you will give login Id and password, or will directly sign you in if you are already signed in.

         

Hope it solves your problem. You may comment your problem as well. I faced some other issues as well which I solved but forgot to take screenshots. Thanks.

Wednesday, September 11, 2019

Microsoft get LCS Project Id

To get your LCS project Id follow these steps:

  1. login to your LCS
  2. Click on your project
  3. Let the main main page of project open. You can now get the LCS project Id from the address bar (URL). It is usually 7 digit number.

Wednesday, August 21, 2019

D365FO Sync failed RouteOperationPropertiesResourceRequirementStaging duplicate record

While restoring data from a newer version 'Version 10 Update24 (7.0.5179.35389)' of AX to older version I faced the following error:

"
Table Sync Failed for Table: RouteOperationPropertiesResourceRequirementStaging. Exception: System.InvalidOperationException: Database execution failed: The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.ROUTEOPERATIONPROPERTIESRESOURCEREQUIREMENTSTAGING' and the index name 'I_17244STAGINGIDX'. The duplicate key value is (5637144576, 6_Resource requirements for route operation properties, 6_Resource requirements for route operation properties-2019-08-20T12:21:09-B9A8188398E6401, 0).
"

Solution:

The error is due to the index allow duplicate property. In earlier version it didn't allow duplicate records in new version the problem is fixed and it does allow duplicate records. Because in my case I was taking data from newer version to older version I had to face this issue. Do following steps:

  1. On target VM (older version one), open SQL server and take backup of table 'RouteOperationPropertiesResourceRequirementStaging' data i.e. Generate script and in advanced property select Type of data script to 'Data only'.
  2. Delete truncate RouteOperationPropertiesResourceRequirementStaging table in target VM.
  3. On source VM (newer version one) go to 'AOSService > PackagesLocalDirectory > ApplicationSuite > Foundation > AxTables' and copy RouteOperationPropertiesResourceRequirementStaging. Paste and replace this element on target VM in same location.
  4. Build Application Suite and Application Foundation models and Synchronize database.
  5. After synchronization runs successfully copy and run the SQL insert query you took backup in step 1.

Comment if you need to need any help. Thanks.


Thursday, August 15, 2019

D365fo deploy reports through powershell

To deploy report use powershell following commands:


  1. All reports in all modules

    K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "K:\AosService\PackagesLocalDirectory"

    Here the AOS resides in K drive.
  2. All reports in specific module

    K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "K:\AosService\PackagesLocalDirectory" -Module ApplicationSuite

    Here all reports in Application Suite module will be deployed
  3. Specific report in specific module

    K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "K:\AosService\PackagesLocalDirectory" -Module ApplicationSuite -ReportName MyCustomReport.Report

    Here MyCustomReport.Report inside the Application Suite module is deployed.