Skip to main content
Answer

How to get the List of Extensions

  • May 9, 2023
  • 2 replies
  • 121 views

aaghaei
Captain II
Forum|alt.badge.img+10

Hello Community,

 

Is there any function/method that can list all of the extensions for any given DAC or Graph?

Best answer by DrewNisley

I’m not sure if you need it programatically or not, but you can see all the DAC extensions on the DAC Schema Browser

 

2 replies

artemmazurov69
Freshman II

As far as I know, there is no built-in method for this in Acumatica. However, if you need to retrieve all existing extensions for a graph, you can implement your own method.

public List<Type> ListExtensionsFor<TGraph>() where TGraph : PXGraph
{
    var extensions = AppDomain.CurrentDomain.GetAssemblies()
        .SelectMany(assembly =>
        {
            try
            {
                return assembly.GetTypes();
            }
            catch (ReflectionTypeLoadException ex)
            {
                return ex.Types.Where(t => t != null);
            }
        })
        .Where(type => type is { IsClass: true, IsAbstract: false })
        .Where(type =>
            type.BaseType != null &&
            type.BaseType.IsGenericType &&
            type.BaseType.GetGenericTypeDefinition() == typeof(PXGraphExtension<>) &&
            type.BaseType.GetGenericArguments().First() == typeof(TGraph))
        .OrderBy(type => type.FullName)
        .ToList();

    return extensions;
}

This method is for retrieving GraphExtension’s, but I don't think it would be too difficult to adapt it for DACs as well.


DrewNisley
Pro I
Forum|alt.badge.img+3
  • Pro I
  • Answer
  • June 18, 2025

I’m not sure if you need it programatically or not, but you can see all the DAC extensions on the DAC Schema Browser