• Tiia Tirkkonen 18
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
I have followed instructions in this knowledge article for sending email templates in recipient's language: 
https://help.salesforce.com/articleView?id=000120154&language=en_US&type=1

I have the language set in the messaging:emailTemplate tag based on recipient's LanguageLocaleKey:
<messaging:emailTemplate subject="Subject" recipientType="User" relatedToType="Object__c" language="{!recipient.LanguageLocaleKey}" >
Component reference for emailTemplate, 'language' attribute: "The language used to display the email template. Valid values: Salesforce.com-supported language keys, for example, "en" or "en-US". Accepts merge fields from recipientType and relatedToType."

.. and included custom labels into the template: {!$Label.test}

There is a translation for the language I'm changing to in my settings that I'm testing for. I've also tried with apex:outputText, apex:outputLabel, etc... and still I keep getting the custom label value in English (default language).

Any ideas what I'm missing?
I have a record of the Incident object that is automatically submitted for approval upon creation. The approval process locks the record, but I would like to unlock it right away.

Now in my trigger I have:

trigger IncidentBeforeTrg on Incident__c (before insert, before update) {
for(Incident__c newInc:trigger.New){
if(Trigger.isUpdate && Approval.isLocked(newInc.Id)){
Approval.unlock(newInc.Id);
}
}
}

But this does not seem to be doing anything. What am I missing?
I have followed instructions in this knowledge article for sending email templates in recipient's language: 
https://help.salesforce.com/articleView?id=000120154&language=en_US&type=1

I have the language set in the messaging:emailTemplate tag based on recipient's LanguageLocaleKey:
<messaging:emailTemplate subject="Subject" recipientType="User" relatedToType="Object__c" language="{!recipient.LanguageLocaleKey}" >
Component reference for emailTemplate, 'language' attribute: "The language used to display the email template. Valid values: Salesforce.com-supported language keys, for example, "en" or "en-US". Accepts merge fields from recipientType and relatedToType."

.. and included custom labels into the template: {!$Label.test}

There is a translation for the language I'm changing to in my settings that I'm testing for. I've also tried with apex:outputText, apex:outputLabel, etc... and still I keep getting the custom label value in English (default language).

Any ideas what I'm missing?
I have a record of the Incident object that is automatically submitted for approval upon creation. The approval process locks the record, but I would like to unlock it right away.

Now in my trigger I have:

trigger IncidentBeforeTrg on Incident__c (before insert, before update) {
for(Incident__c newInc:trigger.New){
if(Trigger.isUpdate && Approval.isLocked(newInc.Id)){
Approval.unlock(newInc.Id);
}
}
}

But this does not seem to be doing anything. What am I missing?