function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Stephen Glaros 7Stephen Glaros 7 

Any Way To Add a Custom "Add Documents" Button to VF Page Without Coding?

Hi all,

I have a requirement where I need requestors, completing a request form, to have the option to upload relevant documents before they save the record (versus saving the record and adding documents to Notes and Attachments). Similar to the screenshot attached. 

I've been searching various forums and I'm thinking it's not possible to do without knowing apex, but wanted to ask the community just in case there is a way to add this type of button. 

If not, has anyone had any experience trying to create a validation rule where a requestor clicks a checkbox "Additional Documents?" and, if they don't add documents to Notes and Attachments, the record doesn't save?

Thank you in advance!
Sample of Document Upload
Best Answer chosen by Stephen Glaros 7
VinayVinay (Salesforce Developers) 
Hi Stephen,

There is no way you can use the standard button in your VF page.

Yes, you can use roll-up summary field to check related list record count and throw validation rule.

You can review comments, details, and vote for below Idea 'Validation Rules for Related Lists'.

https://trailblazer.salesforce.com/ideaView?id=08730000000BqWH

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar

All Answers

VinayVinay (Salesforce Developers) 
Hi Stephen,

There is no way you can use the standard button in your VF page.

Yes, you can use roll-up summary field to check related list record count and throw validation rule.

You can review comments, details, and vote for below Idea 'Validation Rules for Related Lists'.

https://trailblazer.salesforce.com/ideaView?id=08730000000BqWH

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
This was selected as the best answer
Stephen Glaros 7Stephen Glaros 7
Thank you Vinay - exactly what I was looking for.
Best regards,
Stephen