• Francesca Colazzo
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hi,
I'm having troubles with setting Service Report Language. The documentation says:
 
"The language is selected in the Service Report Language field on the associated work order. If the work order doesn’t specify a service report language, the report is translated in the default language in Salesforce of the person generating the report."
 
So, I choose the language (English) on the work order, but when my resource (that is Italian and use Italian as language) generate service report, it shows in italian.
 
Has anyone had the same problem?
Hi,
I'm having troubles with setting Service Report Language. The documentation says:
 
"The language is selected in the Service Report Language field on the associated work order. If the work order doesn’t specify a service report language, the report is translated in the default language in Salesforce of the person generating the report."
 
So, I choose the language (English) on the work order, but when my resource (that is Italian and use Italian as language) generate service report, it shows in italian.
 
Has anyone had the same problem?
I am using an example of how to attach a pdf through an email template from this link https://www.codeproject.com/Tips/1129916/How-to-Attach-a-Dynamic-PDF-to-a-Salesforce-Messag and trying to adapt it to a custom object I have but when i send an email I get a blank pdf file. There is only one field that should be on there but I wanted to test this to see if it will work before i add more fields to the code. My code is below. If anyone could help me I would appreciate it. I know I'm missing something simple. 

email template
<messaging:emailTemplate subject="Invoice Attached" recipientType="User" relatedToType="Request_for_Special_Payment__c">

<messaging:attachment renderAs="PDF" filename="Invoice.pdf">
        <c:IncludeAttachments rId="{!relatedTo.Id}"/>
    </messaging:attachment>
    <messaging:htmlEmailBody >
    <html xmlns="http://www.w3.org/1999/xhtml">
        Please find your invoice attached.
    </html>
    </messaging:htmlEmailBody>
</messaging:emailTemplate>
Apex Class
IncludeAttachmentsController
global class IncludeAttachmentsController {

/* Variables and Constants */

global String PageContents{ get; set; }
global String rIdObjectId{ get; set {
    UpdateContents(value);
} }

public void UpdateContents(String rIdObjectId) 
{
    try {
        PageReference pageRef = Page.Invoice;
        pageRef.getParameters().put('rId', rIdObjectId);
    
        PageContents = pageRef.getContent().toString().replace
        ('<html style="display:none !important;">', '<html>');
    } catch(exception ex) { 
        PageContents = 'An error has occurred while trying to generate this invoice.  Please contact customer service.';
    }
}
}
Visualforce Component
IncludeAttachments
<apex:component controller="IncludeAttachmentsController" access="global">
    <apex:attribute name="rId"

        description="rId Id"

        assignTo="{!rIdObjectId}"

        type="Id" />

    <apex:outputText value="{!PageContents}" escape="false" />
</apex:component>



 
  • December 13, 2017
  • Like
  • 0
Hi,
An error occured verifying the Salesforce Trailhead challenge

Customize a Sales Path for Your Team
Work with opportunities in the kanban view

https://trailhead.salesforce.com/projects/customize-a-sales-path-for-your-team/steps/work-with-opportunities-in-the-kanban-view

Error: Challenge Not yet complete... here's what's wrong: 
Couldn’t find filters for the opportunities with the correct information. Please double check the instructions.

Other strange things:
The Filter Logic is not mentioned.
I do not see the United Oil Plant Standby Generators opportunity/card
and i cannot save the list view...

Any idea's how to complete this challenge?

Thank you and regards, albert
 
I am trying to call a flow from an Apex class that will eventually run on a monthly basis but i cannot get the syntax correct. Can anyone help me? 

I do not need to pass any values or params into the flow. Just need to call it. 

Here is my code:
global class scheduledMerge implements Schedulable {
   global void execute(SchedulableContext SC) {
    Flow.Interview.Reset_Badge_Count_Each_Month resetbadge = new Flow.Interview.Reset_Badge_Count_Each_Month;
    resetbadge.start();
   }
}

Here is my error: 
User-added image

Thanks for any help you can give!