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 through Apex code?

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[]{''});
email.setSubject('System Overview Report');

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

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