Showing posts with label delete. Show all posts
Showing posts with label delete. Show all posts

Monday, December 21, 2020

Get default dimension name and description in Dynamics 365 finance and operations

I had requirement to get default dimension for Main account and when I look at internet I could see all of them  are so complex to get dimension name and description especially description. 

In fact we don't need all of them because in out of the box we have view which gives all this info by just one select query. if we have Default dimension and dimension. 


This view has method DefaultDimensionView.dimensionDiscription() which gives dimension description.

Please code for your reference, hope you find this useful!  

public static void main(Args _args)

    {

        #define.DimensionName("Department");

        DefaultDimensionView DefaultDimensionView;


        select firstonly DefaultDimensionView

             where DefaultDimensionView.Name == #DimensionName

                && DefaultDimensionView.DefaultDimension == 5637451520;//RecId of default dimension


        info(strFmt('Dimension Name: %1, Dimension description:%2', DefaultDimensionView.DisplayValue, DefaultDimensionView.dimensionDiscription()));

    }



Monday, December 9, 2019

New feature - "Job history cleanup" batch job for Data management and other cleanup routines in Dynamics 365 for Finance and Operations

In this blog I would like to explain about the new batch job introduced in data management to clean up execution history and other list of clean up jobs which are available across modules in Dynamics 365 for Finance and Operations. 

Please check the list of clean up jobs in D365FO in Microsoft blog

And the most awaited clean up job has been released for Data management module (available in Platform update 29 and later), which is very important for most of the business as every business uses Data management (Integration, Data Migration or BYOD etc..) and this should be scheduled to clean up data regularly, else we end up with performance issues.

This “Job history cleanup” clears information from following tables.
    •   All STAGING TABLES
    •   DMFSTAGINGVALIDATIONLOG
    •   DMFSTAGINGEXECUTIONERRORS
    •   DMFSTAGINGLOGDETAIL
    •   DMFSTAGINGLOG
    •   DMFDEFINITIONGROUPEXECUTIONHISTORY
    •   DMFEXECUTION
    •   DMFDEFINITIONGROUPEXECUTION   
The functionality must be enabled in feature management and then can be accessed from Data management > Job history cleanup.


      1.     Please go All workspaces > Feature management and select “Execution history cleanup” and enable.



        2. Once we enable this feature then we should be able to see new tile called "Job history clean up" added to Data management module.








































This can be run as batch job with following parameters setting up.
  •   Number of days to retain history
  •   Number of hours to execute the job
  •   Recurring batch
For more information check Microsoft documentation.

Tags, 

#D365FO, #DataManagement, #CleanUp, #Clear, #DeleteExecutionHistory, #JobHistoryCleanup