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
Shri RajShri Raj 

renderAs as XML Attachment in Salesforce. And Zip the Attachment.

Just like we generate a PDF File using Apex/VF, Can we render Data in an XML format from a Page or anywhere else? And also, Can we Zip the attachment? The reason is, Thats how we are supposed to email the attachment to a particular address. Therefore,

1. Render data in an XML Attachment
2. Zip the attachment
3. Email the attachment. (I know we can do this)

Please guide

Thanks
Shri
Best Answer chosen by Shri Raj
AshlekhAshlekh
Hi 

For tex/xml you can see this link http://it.toolbox.com/blogs/anything-worth-doing/a-better-way-to-generate-xml-on-salesforce-using-visualforce-55433
And 4) we can downlaod the attachment in our system.



IF it helps you than please mark it as a solution and ENJOY APEX

All Answers

AshlekhAshlekh
Hi,

You can do below things

1) Render data in an XML by contentType=text/xml.
2) You can not make zip in apex.
3) Yes you can email with attachment.
 
Shri RajShri Raj
Hello Ashlekh, 

Thanks for the reply. Do you have any examples of how to use VF and pass ContentType = text/XML?

I forgot to include another question in that list. 

4) Can we download attachments and schedule it ? If this is possible, I think through DOS we can Zip the files which is sufficient. So that the external team can access a Shared Folder rather than a email. 
AshlekhAshlekh
Hi 

For tex/xml you can see this link http://it.toolbox.com/blogs/anything-worth-doing/a-better-way-to-generate-xml-on-salesforce-using-visualforce-55433
And 4) we can downlaod the attachment in our system.



IF it helps you than please mark it as a solution and ENJOY APEX
This was selected as the best answer
Shri RajShri Raj
Thanks Ashlekh. That link should get me going...