You need to sign in to do that
Don't have an account?

documents and attaching them to email
Hello,
I would enable the our users to select any document from a folder an attach it to an email.
I already have the functionality to select existing attachments and to upload a file, but I do not seem to get the correct list of document folders.
What I would like to do is:
A drop-down selectList to select the documents' folder.
Then a selectList to show the documents in the selected folder and let the user select the documents he wants to attach to the emailMessage.
Currently this is where I am stuck. The list of folders always contains every users' personal folder. I would rather use the same list that is displayed when accessing the Document object.
Is there any way to mimic the behavior of that picklist?
Regards,
hoomel
Actually I knew that already, but thanks anyway.
My 'problem' solved itself pretty quick.
As administrator, I saw everyone's personal folder and some folders with empty names and only stars as the name.
Logging in as a standard user, I realized that these folders are not visible.
So everything is correct there and the selectList works completely fine.
I just had some doubts because of all those unwanted folders showing up.
Nevertheless, thanks for the reply!
Regards,
hoomel
All Answers
You need to query all document folder names and Ids and use that in a VF page select list .
The Apex code for that :
This will return the ids and names of all the folders in your org , using which you can create a select list and then query the documents for the selected folder based on folder id;
Hope that helps.
Actually I knew that already, but thanks anyway.
My 'problem' solved itself pretty quick.
As administrator, I saw everyone's personal folder and some folders with empty names and only stars as the name.
Logging in as a standard user, I realized that these folders are not visible.
So everything is correct there and the selectList works completely fine.
I just had some doubts because of all those unwanted folders showing up.
Nevertheless, thanks for the reply!
Regards,
hoomel
Hi,
I want to implement similar functionality as standard send email functionality, in which i want exact replica of Attach file page. I dont have any idea about emails sending and attachments. Can anyone help ?
Thanks,
Seema
What exactly do you need help with?
I have created a page to mimic the email functionality but without replicating the Attach file page (not possible at all?). Maybe I can help you in some way?
Regards,
Marc