You need to sign in to do that
Don't have an account?
Visualforce Page that allows File Input to check a box
I would like to make a separate VF page with 3 file upload sections (Upload Document "A", Upload Document "B", Upload Document "C") or even just custom buttons name "Doc A", "Doc B", "Doc C" that when used to attach a file will mark a corresponding checkbox to checked:
Document "A" attached?
Document "B" attached?
Document "C" attached?
We are having trouble with getting our staff to check the box after they have uploaded a "specific" document and it seems like I can bind that action into the act of uploading the attachment somehow...but I don't know where to begin or what the best methodology is for this.
Any suggestions? or examples of similar solutions?
Its a little difficult to give specific help, as you don't specify what you are attaching these items to and if you want the persist the checkbox values against an object.
Do you want the box to be checked prior to the attachment being loaded (e.g. after the file has been selected) or after the user has submitted back the form and actually attached the file?
As the latter makes more sense, I'm assuming its that!
These file uploads actually happen when the user submits the form back, and presumably bind to variables within your controller. All you need to do is check if the variables contain data (i.e. the attachment name/body isn't null) when displaying the checkboxes.
My apologies, it was a big vague. I forget the board has not been banging their heads against the details like I have been *grin*.
The files must be attached to the Opportunity and as you correctly deduced, the checkbox would need to "check" after the user submits the form and the file is actually attached.
I would love it if the checkbox could update based on part of the filename but with my newbie status (I have only done an "update" visualforce page and one simple trigger) I figured I couldn't begin to tackle that one so I ended up with thinking I may be able to figure out how to make a separate "upload" button for each "type" of file and then tie that button action to updating the checkbox.
What the goal is to monitor the compliance of the sales staff - there must be 5 files attached to each opportunity.
There are matching checkboxes:
Unfortunately we have not had luck with anyone doing BOTH steps so we are trying to automate the process as we use those 5 checkboxes to assign a "grade" that rates completion per Opportunity then per Owner across all of their Opportunities. A "naughty list" if you will *grin*
If anyone has a controller example of a file upload action checking a box that could get me started I would really appreciate it. I will continue to search the boards for an existing example in the meantime.
Thanks!
Assuming the following:
How to do file upload for any SObject using Visualforce.