• killertypo
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 9
    Replies

Is there a way to get a view of all current chatter hash tag's sized or ordered by use? 

 

 

for example: 

 

opportunities contact leads new-leads accounts past-due lost-accounts

 

The larger ones = used more often, the smaller ones = used less often. 

 

clicking on any of the tags would then open a page listing a handful of the most recent chatters containing those tags?  

I have the following code: 

 

//
    // Will email the page as an attached PDF 
    // 
    public PageReference getForwardAsPDF() { 
        // Setup the email    
        Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
        String [] toAddress = new String[] { 'test@email.com' }; 
        email.setToAddresses(toAddress); 
        email.setReplyTo('sandbox@test.com.maintest');   
        email.setSubject('From forwardAsPDF!');
        email.setPlainTextBody('Here is the body of the email'); 

        // Get the pdf-ized secondary page
        PageReference pdf = Page.ERAEmailAttachment; // Duplicate page - so i don't get the dreaded getContent() error
        pdf.getParameters().put('id', era.Id); 
        pdf.getParameters().put('asEmail', 'false');
        pdf.setRedirect(true);
        
        // Grab the content of said page 
        Blob b = pdf.getContent();                
        Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
        efa.setFileName('ERAsomedatestring.pdf');
        efa.setBody(b);
        email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});
        
        // Send the email
        Messaging.SendEmailResult [] r = Messaging.sendEmail(new Messaging.SingleEmailMessage[] { email });
        for ( Messaging.SendEmailResult result : r ) 
        {
            if ( !r[0].isSuccess () ) 
            {
                System.debug ( result  );
            }
            else
            {
                ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.INFO, 'Email Sent Successfully' );
                ApexPages.addMessage(msg);
            }
        }
        
        return null;
    }

 

 

And the following VF / PDF page

 

(I'll spare you the details of the form since it is massive) 

 

<apex:page standardController="ERA__c" extensions="ERAFormProcessor" renderAs="pdf" action="{!if($CurrentPage.parameters.asEmail == 'true', forwardAsPDF, null)}" >
....blah
</apex:page>

 

 

I have the page setup so that when I pass the parameter asEmail=true (as you can see above) it calls the forwardAsPDF method.  

 

The return from this method is that the email was sent successfully, but I have yet to receive anything in my inbox.  :( 

 

What am I missing here.  

I have the following code: 

 

//
    // Will email the page as an attached PDF 
    // 
    public PageReference getForwardAsPDF() { 
        // Setup the email    
        Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
        String [] toAddress = new String[] { 'test@email.com' }; 
        email.setToAddresses(toAddress); 
        email.setReplyTo('sandbox@test.com.maintest');   
        email.setSubject('From forwardAsPDF!');
        email.setPlainTextBody('Here is the body of the email'); 

        // Get the pdf-ized secondary page
        PageReference pdf = Page.ERAEmailAttachment; // Duplicate page - so i don't get the dreaded getContent() error
        pdf.getParameters().put('id', era.Id); 
        pdf.getParameters().put('asEmail', 'false');
        pdf.setRedirect(true);
        
        // Grab the content of said page 
        Blob b = pdf.getContent();                
        Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
        efa.setFileName('ERAsomedatestring.pdf');
        efa.setBody(b);
        email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});
        
        // Send the email
        Messaging.SendEmailResult [] r = Messaging.sendEmail(new Messaging.SingleEmailMessage[] { email });
        for ( Messaging.SendEmailResult result : r ) 
        {
            if ( !r[0].isSuccess () ) 
            {
                System.debug ( result  );
            }
            else
            {
                ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.INFO, 'Email Sent Successfully' );
                ApexPages.addMessage(msg);
            }
        }
        
        return null;
    }

 

 

And the following VF / PDF page

 

(I'll spare you the details of the form since it is massive) 

 

<apex:page standardController="ERA__c" extensions="ERAFormProcessor" renderAs="pdf" action="{!if($CurrentPage.parameters.asEmail == 'true', forwardAsPDF, null)}" >
....blah
</apex:page>

 

 

I have the page setup so that when I pass the parameter asEmail=true (as you can see above) it calls the forwardAsPDF method.  

 

The return from this method is that the email was sent successfully, but I have yet to receive anything in my inbox.  :( 

 

What am I missing here.  

I recently upgraded my Force.com IDE (and all projects) to the Winter '12 release. Since upgrading, I've been observing that when I attempt to run unit tests against an Apex class, it often takes a very long time to execute. Even relatively simple tests sometimes take a minute or two to complete. The time doesn't seem to be spent during test execution, but rather during the "preparing results..." phase (based on the progress indicator in the IDE). Reducing the log level doesn't seem to have any impact one way or the other. I've also seen it simply get stuck in the "preparing results..." phase to the point where I had to kill the Eclipse process. Anyone else seeing this?

  • January 04, 2012
  • Like
  • 0