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
rishi jaykar 1rishi jaykar 1 

how to get System Overview page detail in apex class or visualforce page

NagendraNagendra (Salesforce Developers) 
Hi Rishi,

Here is one-way using Apex that will send the System Overview page as a PDF attachment.
Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); 
email.setHtmlBody('System Overview Resport attached');
email.setToAddresses(new string[]{'root@eruditorum.org'});
email.setSubject('System Overview Report');

Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
efa.setFileName('systemOverview.pdf');
string partialURL = '/setup/systemOverview.apexp?setupid=SystemOverview';
Pagereference systemOverviewPr = new PageReference(partialURL);
efa.setBody(systemOverviewPr.getContentAsPdf());
email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});

Messaging.SendEmailResult[] r = Messaging.sendEmail(new Messaging.Singleemailmessage[] { email});
Hope this helps.

Thanks,
Nagendra
 
 
rishi jaykar 1rishi jaykar 1
it's helpful but i want to get this content in apex class not in pdf format.
like:
Integer cObjectLimit=customObjects;
etc