Skip to main content
Solved

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


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:

https://community.acumatica.com/customization-and-development-72/how-to-add-a-custom-button-to-the-files-dialog-box-4229

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.

View original
Did this topic help you find an answer to your question?

2 replies

Leonardo Justiniano
Jr Varsity I
Forum|alt.badge.img+5

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 I
Forum|alt.badge.img+5

Hi @dgross54 

 

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

https://community.acumatica.com/customization-and-development-72/how-to-add-a-custom-button-to-the-files-dialog-box-4229

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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings