Skip to main content
Answer

Customize File Dialog Box and Add column to the grid

  • September 19, 2022
  • 4 replies
  • 426 views

arun83
Jr Varsity II
Forum|alt.badge.img

Hi team,

 

Is it possible to customize file dialog to add new column.

 

 

Thanks,

Arun.

Best answer by Nayan Vadher

I asked a similar question to Developer support in the past and was told it was either not possible or not practical. I forget which.

Short answer is - not possible.  

This dialog is not available for customization, except that one can only add some custom buttons to it.  e.g. below:

     public class FilesDialogExtender : IFilesDialogExtender

{
public void AddAction(PXGraph graph, string view)
{
if ((graph is PXGenericInqGrph) ||
(String.IsNullOrEmpty(graph.PrimaryView)) ||
(graph.PrimaryItemType == null))
{ return; }

if (!graph.Actions.Contains("MyButton"))
{
PXButtonDelegate uploadFromDemo1 = delegate (PXAdapter adapter)
{
var g = adapter.View.Graph;
g.Views[g.PrimaryView].Ask("MyButton", MessageButtons.OK);
return adapter.Get();
};
PXButtonAttribute buttonAttribute = null;
{
buttonAttribute = PXEventSubscriberAttribute.CreateInstance<PXButtonAttribute>();
buttonAttribute.VisibleOnDataSource = false;
buttonAttribute.PopupVisible = false;
}

PXUIFieldAttribute uiFieldAttribute = null;
{
uiFieldAttribute = PXEventSubscriberAttribute.CreateInstance<PXUIFieldAttribute>();
uiFieldAttribute.DisplayName = "My Button";
uiFieldAttribute.Visible = true;
uiFieldAttribute.MapEnableRights = PXCacheRights.Select;
uiFieldAttribute.MapViewRights = PXCacheRights.Select;
}
List<PXEventSubscriberAttribute> attribs = new List<PXEventSubscriberAttribute>();
attribs.Add(buttonAttribute);
attribs.Add(uiFieldAttribute);
PXNamedAction.AddAction(graph, graph.PrimaryItemType, "MyButton", "My Button", uploadFromDemo1, attribs.ToArray());
}
}

public IEnumerable<ToolbarButtonDescriptor> GetToolbarButtons(PXGraph graph, string view)
{
Type graphType = graph?.GetType();
if ((graphType != typeof(PXGenericInqGrph)))
{
var btn = new ToolbarButtonDescriptor(null, "MyButton", "MyButton");
btn.CommandArgument = view;

return new ToolbarButtonDescriptor[] { btn };
}
return null;
}
}

 

4 replies

darylbowman
Captain II
Forum|alt.badge.img+15

I asked a similar question to Developer support in the past and was told it was either not possible or not practical. I forget which.

If it is possible, I would like to customize the column sizes.


Nayan Vadher
Community Manager
Forum|alt.badge.img+2
  • Acumatica Developer Support
  • Answer
  • September 19, 2022

I asked a similar question to Developer support in the past and was told it was either not possible or not practical. I forget which.

Short answer is - not possible.  

This dialog is not available for customization, except that one can only add some custom buttons to it.  e.g. below:

     public class FilesDialogExtender : IFilesDialogExtender

{
public void AddAction(PXGraph graph, string view)
{
if ((graph is PXGenericInqGrph) ||
(String.IsNullOrEmpty(graph.PrimaryView)) ||
(graph.PrimaryItemType == null))
{ return; }

if (!graph.Actions.Contains("MyButton"))
{
PXButtonDelegate uploadFromDemo1 = delegate (PXAdapter adapter)
{
var g = adapter.View.Graph;
g.Views[g.PrimaryView].Ask("MyButton", MessageButtons.OK);
return adapter.Get();
};
PXButtonAttribute buttonAttribute = null;
{
buttonAttribute = PXEventSubscriberAttribute.CreateInstance<PXButtonAttribute>();
buttonAttribute.VisibleOnDataSource = false;
buttonAttribute.PopupVisible = false;
}

PXUIFieldAttribute uiFieldAttribute = null;
{
uiFieldAttribute = PXEventSubscriberAttribute.CreateInstance<PXUIFieldAttribute>();
uiFieldAttribute.DisplayName = "My Button";
uiFieldAttribute.Visible = true;
uiFieldAttribute.MapEnableRights = PXCacheRights.Select;
uiFieldAttribute.MapViewRights = PXCacheRights.Select;
}
List<PXEventSubscriberAttribute> attribs = new List<PXEventSubscriberAttribute>();
attribs.Add(buttonAttribute);
attribs.Add(uiFieldAttribute);
PXNamedAction.AddAction(graph, graph.PrimaryItemType, "MyButton", "My Button", uploadFromDemo1, attribs.ToArray());
}
}

public IEnumerable<ToolbarButtonDescriptor> GetToolbarButtons(PXGraph graph, string view)
{
Type graphType = graph?.GetType();
if ((graphType != typeof(PXGenericInqGrph)))
{
var btn = new ToolbarButtonDescriptor(null, "MyButton", "MyButton");
btn.CommandArgument = view;

return new ToolbarButtonDescriptor[] { btn };
}
return null;
}
}

 


  • Freshman II
  • July 11, 2025

Hi, 

Although thread is marked as solved but may be with Version improvement, is there any enhancement done in Acumatica related to Customize Dialog Box? Because I have scenario in which I need to add button to upload sharepoint files, some filter lookup alongwith columns.

An early help will be appreciated.

 

Regards,

Subodh

 


  • Freshman II
  • July 17, 2025

Hi ​@Nayan Mansinha , 

After following above steps, I am still not able to Add Custom Button on Files Dialog. Is there anything which I am missing? Could you please guide more on it?

Thanks in advance. 

Regards,
Subodh