• Curry-Man
  • NEWBIE
  • 25 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 11
    Replies

We are currently looking for a developer to assist on projects periodically.  The ideal candidate must have experience using the Messaging class, and must be able to read/author/edit Apex classes, triggers, and test coverage.

I've created a simple visualforce page that references a custom object (Quote__c) and renders the content as a PDF.  I have a custom controller that references the page and I'm attempting to send the PDF as an email attachment, which works, but is sending the wrong information in the pdf body.

 

Here is my concept page:

 

 

<apex:page standardController="Quote__c" extensions="addProducts" showheader="false" id="quote" renderAs="pdf">
<apex:stylesheet value="/resource/1269370798000/ContractStyles" />
<h3>{!Quote__c.ID}</h3>
<h3>{!Quote__c.name}</h3>
<h3>{!Quote__c.SOW__c}</h3>
</apex:page>

 

and here is my controller:

 

	public addProducts(apexpages.standardcontroller controller){
	    quote = (Quote__c)controller.getRecord();
	}
	
	public PageReference SendDocument(){	
			PageReference pdf =  Page.PackagePreview;
		pdf.getParameters().put('id',quote.id); 
		pdf.setRedirect(true);
		
		Blob b = pdf.getContentAsPDF();
		
		Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
			efa.setFileName('attachment.pdf');
			efa.setBody(b);

			Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
				String[] toAddresses = new String[]{'danielc@schoolcenter.com'};
				mail.setToAddresses(toAddresses);
				mail.setSaveAsActivity(true);
				mail.setSenderDisplayName('SchoolCenter');
				mail.setSubject(quote.subject__c);
				mail.setPlainTextBody(quote.body__c);
				mail.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});
			Messaging.SendEmailResult[] mailresults = Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
			for(Messaging.SendEmailResult mailresult : mailResults){
				system.debug(mailresult);
			}
	}

 

Any suggestions on how to get the PDF to pull the correct information into it as an email attachment?

 

I'm using their default WSDL and have been unable to import it.   Each time I fix an error, another one pops up.  Is there anyone that's had success with using the GTM web service from Citrix?

 

 

I have an object that has a series of related lists in a model as follows:

 

Opportunity>Document>Section>Term

 

Is there any way in VF to display the Terms as sets of Sections as sets of a Document within a page displaying the Opportunity as the root element?

Hello.  I am trying to connect to SF using the enterprise wsdl and am receiving the error message:
 
 'uri' option is requred in nonWSDL mode. 
 
I have added the url for my server to the trusted ip ranges in my org's setup, but cannot seem to get the script to connect without displaying that error message.  Any ideas?

We are currently looking for a developer to assist on projects periodically.  The ideal candidate must have experience using the Messaging class, and must be able to read/author/edit Apex classes, triggers, and test coverage.

Hello,

 

I'm getting an error today when trying to save APEX changes in Eclipse:  

 

"Save error: Unable to perform save on all files: PermGen space".

 

Is this a problem in my workspace, or in the SF Org I am developing in?

 

Thank you

I have an object that has a series of related lists in a model as follows:

 

Opportunity>Document>Section>Term

 

Is there any way in VF to display the Terms as sets of Sections as sets of a Document within a page displaying the Opportunity as the root element?

Hi,

 

When will eclipse galileo be suppoted for the IDE?

 

Thanks