Skip to main content
Answer

How do I access the FILES dialog box via customization project (or even in the UI itself)?

  • December 27, 2022
  • 2 replies
  • 383 views

Forum|alt.badge.img

 

I am trying to access the ADD LINK action in the appointments screen which, when invoked, calls up the Search In Files screen.  When I add the Appointments screen to a customization project I am unable to find any reference to this dialog box or linkage anywhere.  Does anyone know how I can access this dialog box?

 

 

 

 

 

Best answer by Leonardo Justiniano

Hi @dgross54 

 

I did further research and questions around and I got this step by step from the community:

It might be helpful in what you want to address in your code. I always try no to go that far deep but the Acumatica Framework always has a path.

 

Hope this also can help.

2 replies

Leonardo Justiniano
Jr Varsity II
Forum|alt.badge.img+4

Hi @dgross54 

 

This dialog box is part of the main frame screen and is hidden for customizations. What do you want to customize in that dialog?

You could have access to the files of the appointment by doing:

Guid[] files = PXNoteAttribute.GetFileNotes(sender, row);
foreach (Guid fileID in files)
{
// Your logic
}

Also you can customize the upload dialog box logic by creating by adding 

 

Do not forget to set the session key on the dialog:

Then in the code you can have a button with specific custom logic:

 

#region UploadButton
public PXAction<GCSetup> UploadButton;
[PXUIField(DisplayName = "YourButtonLabelHere", Enabled = false)]
[PXButton]
protected virtual IEnumerable uploadButton(PXAdapter adapter)
{
if (AppointmentRecords.AskExt() == WebDialogResult.OK)
{
const string psk = "YourSessionKeyHere";
PX.SM.FileInfo info = PX.Common.PXContext.SessionTyped<PXSessionStatePXData>().FileInfo[psk] as PX.SM.FileInfo;
if(info != null)
{
FSAppointment config = AppointmentRecords.Current;

// Your Logic Here

PXNoteAttribute.AttachFile(AppointmentRecords.Cache, config, info);
PXNoteAttribute.SetFileNotes(AppointmentRecords.Cache,config, info.UID.Value);
Actions.PressSave();
}
}
return adapter.Get();
}
#endregion

Hope this helps

Happy New Year!


Leonardo Justiniano
Jr Varsity II
Forum|alt.badge.img+4

Hi @dgross54 

 

I did further research and questions around and I got this step by step from the community:

It might be helpful in what you want to address in your code. I always try no to go that far deep but the Acumatica Framework always has a path.

 

Hope this also can help.