• Shoal
  • NEWBIE
  • 25 Points
  • Member since 2012

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

Hello,

 

I am having some trouble with chinese characters in PDF generation.

I do not know any chinese, but the customer gave me a document to copy the text excerpts from and I have already done that. What strikes me as odd is that most of the characters show up, but some just don't.

Wherever I want to insert them in the page, they are not shown in the PDF.

 

Is there any reason why this is happening?

This is one of the text excerpts that do not show up anywhere on the page: 设备租用报价

 

Maybe I have to set some enconding parameters in the header?

 

Thanks for any advice.

 

Best Regards,

Marc

  • February 21, 2012
  • Like
  • 0

Hello,

 

I am having some trouble with chinese characters in PDF generation.

I do not know any chinese, but the customer gave me a document to copy the text excerpts from and I have already done that. What strikes me as odd is that most of the characters show up, but some just don't.

Wherever I want to insert them in the page, they are not shown in the PDF.

 

Is there any reason why this is happening?

This is one of the text excerpts that do not show up anywhere on the page: 设备租用报价

 

Maybe I have to set some enconding parameters in the header?

 

Thanks for any advice.

 

Best Regards,

Marc

  • February 21, 2012
  • Like
  • 0

I have a custom object (Eval_Forecast__c) and some email templates.

 

In a trigger, I would like to send an email using those templates populating the dynamic text of the template. I can get the email to send, but the problem is the dynamic text is not populated.

 

When I set the WhatId (which seems to be what I need to do), I get the error:

 

SendEmail failed. First exception on row 0; first error: INVALID_ID_FIELD, WhatId is not available for sending emails to UserIds.

 

 

Here is the Apex code:

 

Messaging.SingleEmailMessage emailOut = new Messaging.SingleEmailMessage(); if(forecast.Stage__c =='Submitted to Sales Operations') { emailOut.setTemplateId('00XQ0000000QCUo'); } if(forecast.Stage__c =='Sales Order Released') { emailOut.setTemplateId('00XQ0000000QCV3'); } if(forecast.Stage__c =='Closed Cancelled') { emailOut.setTemplateId('00XQ0000000QCV8'); } emailOut.setTargetObjectId(user.Id);

 

Here is a sample of the template code:

 

*** Sales Order Has Been Released *** Eval Forecast Name: {!Eval_Forecast__c.Name} Account Name: {!Eval_Forecast__c.Account_name__c} Sales Order Number: {!Eval_Forecast__c.Sales_Order_Number__c} IMTR Number : {!Eval_Forecast__c.IMTR_Number__c} Note: Your Sales Order has been removed from shipping block and is now elidgible to ship.

 

 thanks,

 

lee