Flush the AOS cache from code. AX-2012

Flush the AOS cache from code.  AX-2012 


Well while working on a old project my project lead shared with me a very nice little trick. 


Well the trick is to copy these three menu items, and then change the run from property to server. Now you can launch these menu items, and they will run on the server, therefore clearing the AOD, sys data, and dictionary, causing a refresh. 

Menu item you can find on the below path
[Under Menu items > Action]

  1.  SysFlushAOD
  2.  SysFlushData
  3.  SysFlushDictionary

Task Recorder D365FO


Task Recorder D365FO


In D365FO Microsoft Introduce a really built in tool Task recording. its allow us to record the step even we can save the steps as documentation.

with simple following steps you can use Task recording as well.


As the following picture shows, the Task Recorder is found under Settings: in the ribbon:
Once in the Task Recorder, you have the options to create a new recording, play back a recording or edit an existing recording as the following picture show. 



Let us start by recording a new Task. 

Give the guide a descriptive name and press the Start button.
The task recorder is now in recording mode. You can stop the recording by clicking on the Stop button in the ribbon.
I would like to structure my Task Guide in sections, so I start my creating a sub-task:


In my demo i am performing some action and you can check in the screen shot Task recorder is recording every steps.

Like 
1st I closed a open page
2nd open Worker from payroll 

Step-1

Step-2


Step-3 Stop



There are two options available to save record.
Word documentation 
Save file in AXtr format.


The database principal owns a fulltext catalog in the database, and cannot be dropped.




The database principal owns a fulltext catalog in the database, and cannot be dropped.

Problem



Msg 15138, Level 16, State 1, Line 1
    The database principal owns a fulltext catalog in the database, and cannot be dropped.

Resolution 


Find the catalog name and change the owner ship like below

Run the command on your database 
select * from sys.fulltext_catalogs


Now change the ownership with below script

Example
ALTER AUTHORIZATION ON Fulltext Catalog::[CatalogName] TO [dbo];  


Script should be in my case like

ALTER AUTHORIZATION ON Fulltext Catalog::[COMMERCEFULLTEXTCATALOG] TO [dbo];  
ALTER AUTHORIZATION ON Fulltext Catalog::[SqlTempDBForSync_catalog] TO [dbo];  


Private, Protected and Public attribute access in Class Extension


Private, Protected, and Public attribute access in Class Extension


lots of developers faced the issue on the daily basis during development to access private, protected, and public methods.

As everyone knows that public attribute is available to access with the class instance.
but protected and private attributes are a little difficult to access.

In this demo, we show how to access all 3 access modifiers using the class extension.


Step-1 Create a class SLD_DemoClass.
Step-2 Declare 3 variables like below and one public method to set values in these variables.






Step-3 Now create an Extension of this class with SLD_DemoClass_Extension.
Step-4 Create a getter setter to access the variable.



for public and protected methods it's easy to access just to write simple getter setter method and can access these public methods using class instance.

Step-5 To Access the private attributes in-class extension, We need to use the C# reflection library.

Step-6 Now write the below code to access the private attribute on run-time.





following is the screenshot of the complete code of the extension class.




Step-7 Now create a run-able class and action menu item to execute this code.





Step-8 perform build & Sync and login on D365FO for verification.



You can check in the screenshot all 3  protected, private, and public attributes values in the info message.


Please feel free to contact me if you are facing any issues during the implementation of this blog.




Upgrade Environment using LCS D365



Upgrade Environment using LCS D365.


You can upgrade your 2-Tier environment to the latest build using LCS.




Step-1 Navigate to your required Environment and click on maintain.
Step-2 Now click on upgrade a popup window will appear.




Step-3 Popup window contains 3 fields to be filled.


  1. Target Environment 
  2. Preferred downtime start date
  3. Preferred downtime start time

Select the Build release on which you want to upgrade your environment and provide downtime as per your feasibility then click next. 





Following is the filled screenshot for your reference.




Step-4 Select the application version from the new window and click next.





Step-5 Now select the database type from the next window.

Three types are available 
  1. None 
  2. Demo 
  3. Public sector data



Step-6 select a custom package if you want to deploy with this upgrade.






Step-7 Enter the email address of the persons who will be notified of every action on the environment.




Step-8  select environment administrator. Only users will appear in the drop-down those who have administrator rights on Project and LCS.




Step-9 verify the summary





Step-10 Now enter your Account name in the text box and click save.




Service will submit to Microsoft and they will start working on the given time window.


Please feel free to contact me if you are facing any issues during the implementation of this blog.











Deploy package using LCS


Deploy package using LCS



Using the following steps you can create the deployable package and deploy it through LCS.

Step-1  Open Visual studio and click on Dynamics365 Menu and select create deployment package from the deploy menu item.





Step-2 Select your model and set the output path of the model and click OK.




Step-3 Login to LCS then navigates to your project.
Ste-4 click on the hamburger icon and select Asset library.




Step-5 Now select software deploy-able package and click on the + icon to add your custom package.


Step-6 Enter the package name and description. would be great if you are follow any naming sequence for packages.

Step-7 Click on Add file button to upload your deployable package.




Step-8 Now click on browse and select package then click on uplaod.




Step-9 You can find the package in the tab of software deploy-able tab Once the package is uploaded successfully.

Step-10 Once LCS mark package as valid. then go to your environment.





Step-11 Now click on Maintain and select apply the update.






Step-12 Select your package and click on apply.



Package deployment will start in few seconds. LCS will show you the progress of every step.



Once the package is completed sign Off the package, So it will visible to you on production deployment as well.





Please feel free to contact me if you are facing any issues during the implementation of this blog.


Production Database backup Request


Production Database backup Request Life cycle service



Using following steps you can request the database backup of production to your UAT Sandbox environment.


Step-1 Click on hamburger Icon and click on support menu item.




Step-2 Now click on Service request tab from left panel.

Step-3 Now click on Add icon a popup window will appear with 3 Different Request.

Step-4  Three type of service request available. Please click on Database Refresh Request.

Following are some information about service request.

Data Point in time restore request 
      This request we use to request Microsoft to restore the production DB on any particular date.

Other Request 
      In this service request we can ask for different options, Like ICM ticket or can request them to update the statistics of production database.

Database Refresh Request
     This service request we use to restore database from production to UAT.  


Step-5 On 1st Drop down select the source environment name. On 2nd drop down select target server name. provide the time window. and acknowledge the both agreement and click next.


Step-6 Mark check box to acknowledge the terms and conditions and click submit. 



You request submitted to Microsoft.


Please feel free to contact me if you are facing any issue while following this 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...