Performance Tool in D365FO


Performance Tool in D365FO
Today, I found standard feature of performance optimization in Dynamics 365 For Finance and Operations ....

Microsoft called this feature as Performance tool


You can find the navigation of this tool as below... 


You will find lots of option here to optimization, Over internet I didn't find any documentation of this feature. So I am sharing some items i have explored.

There is Text box where we can Enter of  the number of records on which we want to check performance using this tool.


Microsoft Divide this Feature in 4 Category

  1. Data  Manipulation
  2. Query
  3. Temp DB & In Memory
  4. Cache 


Data Manipulation

In this MS Checking the performance of 
Insert  
Update
Record Insert List
 Insert Record set
update record set
delete from


Query

In this section testing will perform on the below points


  1. Large Buffer read
  2. Cluster Index
  3. Unique index with cache hit
  4. Unique index without cache hit
  5. Non-Unique Index

Temp DB & In Memory

In this section we can check the performance on Temp DB and In Memory....  

Cache

The same number of records will store in cache ...


Important 
Note that running for 1,000 records will take approximately 1 minute, so be careful using larger numbers not to run into form timeouts. The max record count is 100,000.

Support Faryal's Cusine


FormHasMethod extension in D365FO

 FormHasMethod extension in D365FO


Every developer who has started working on D365FO faces this issue that when we create a method in the form of Extension

For verification of method exists or not in the run time, we can use Global::formHasMethod but it does not work with form extensions

So I advise everyone to use the below code is working... 


Source Link


using  System.Object;
using  Microsoft.Dynamics.Ax.Xpp;
using  System.Reflection;
    [ExtensionOf(classStr(Global))]
 final class Global_Extension
{
    static boolean formHasMethod(FormRun _fromRun, IdentifierName _methodName)
    {
        boolean flag= next formHasMethod(_fromRun_methodName);

        if (flag==true)
        {
            flag= Global::VerifyformExtensionHasMethod(_fromRun_methodName);
        }

        return ret;
    }

    private static boolean VerifyformExtensionHasMethod(FormRun _formRun, IdentifierName _methodName)
    {
        

        try
        {
            System.Object[] extensions = ExtensionClassSupport::GetExtensionsOnType(_formRun.GetType(), true);

            if (extensions)
            {
               System.Type    formExtensionType;
               MethodInfo    mInfo;
             
                var  bindingFlags = BindingFlags::Public | BindingFlags::Static | BindingFlags::IgnoreCase;

                for (int i = 0; i < extensions.Length; i++)
                {
                    formExtensionType= extensions.GetValue(i);

                    var info = formExtensionType.GetMethods(bindingFlags);

                    for (int J = 0; J < info .get_Length(); J++)
                    {
                        mInfoinfo .getValue(J);
                        if (mInfo.Name == _methodName)
                        {
                            return true;
                        }
                    }
                }
            }
        }
        catch (Exception::CLRError)
        {
            error(CLRInterop::getLastException().ToString());
        }

        return false;
    }

}



Support Faryal's Cusine


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...