Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [getcontent]

The tag has no usage guidance.

1
vote
1answer
34 views

Page getContent / getContentAsPDF not retrieving the updated data

I'm able to get all the data by calling the Page.getContentAsPDF() function by selecting all the record from Account object. Basically, I'm loading the pdf content based on query from page ...
0
votes
3answers
38 views

Load a visualforce page in apex controller

Is there a way to load a visual force page in apex controller without viewing the page. The scenario is this I have a visualforcepage with apex:chart embedded. This page will save the chart as an ...
0
votes
1answer
205 views

How can I get slot in Demandware Script?

There is one method by which we can access content slot in demandware, that is by using <isslot> tag in the template, but is there any other way by which we can do that? I mean by using ...
0
votes
0answers
61 views

core.email.template.TemplateRenderingException: You have uncommitted work pending. Please commit or rollback before calling out

I have a problem with the email alert from a process builder. The logs show me the following issue: "core.email.template.TemplateRenderingException: You have uncommitted work pending. Please commit or ...
0
votes
1answer
328 views

Issue with Getting session id using vf page from lightning component

I am trying to get session id from lightning component to get the contents of vf page. I tried the vf page hack provided in Getting Session ID in Lightning But while doing vfpage.getconent(), I am ...
0
votes
1answer
150 views

Pagereference.getContent() is not bringing in the values from the record

Im trying to save a Vf page as an Attachment but the blob does not contain the values from the record. Im trying to understand if i need to pass in the record ID or not.. or what am i missing. Code ...
1
vote
1answer
308 views

Create a pdf attachment when you are a guest user

Good day Everyone. I am trying to create a functionality that will create a pdf and make it as an attachment. It is working fine when you are an authenticated user however when I try to create a ...
1
vote
0answers
172 views

PDF generation failed. Check the page markup is valid.- Occurred when using getContentasPDF

I have a VF page, where I am not using renderas "PDF". In the single email messaging method of Controller, I am using the Attachment as pdf of the VF page. I used getContent() function which ...
3
votes
0answers
88 views

Call getContent() from Workflow Email Alert

I try to call the PageReference's getContent() method from a component that is nested in a visualforce email template. If the template is send via the test button, all looks great. However if I fire ...
1
vote
1answer
879 views

Asynchronous getContent hit org.apache.commons.httpclient.RedirectException: Maximum redirects (100) exceeded

we're having an issue with getContent() in asynchronous context, and I just can't find any way to work around it... We're exposing invocable Apex in our managed package, and one of them allow our ...
1
vote
1answer
690 views

Ampscript for Footer Content

I have about four footer variations that we use at the bottom of our email templates. I've been trying to place the various footers in: MyContents\Company_Footers\FooterNameHere An example footer ...
2
votes
0answers
139 views

How to test getContent() calls in Spring '17?

Now that the Apex Mocks API and its Stub API complement are available is it possible to properly test for a getContent() call? In the past I would just branch out if unit test was running and returned ...
0
votes
1answer
199 views

Why error on getContent() You have uncommitted work pending. Please commit or rollback before calling out

I am getting a log error when running this code. It is launched from the report schedule. You have uncommitted work pending. Please commit or rollback before calling out The part of the code ...
1
vote
0answers
18 views

getContent Issue on Scheduled Apex [duplicate]

Recently, I've been developing a scheduled apex class to send a csv file to an email. I was using the getContent method from a report page to achieve this. I was doing fine when executing it in ...
1
vote
2answers
510 views

Apex rest resource and Pagereference.GetContent

we are using community and site.com in our project. we want to embed VF pages(for allowing Video chatting between Guest user and console users is one of the examples) in our static site.com pages. so ...
0
votes
1answer
903 views

Get multiselect field values (selected) values from one vf page to another

The case is next. On Custom vf page with a standard controller user might to select Users, He hit the Add users button and opens the second vf page (custom controller) with multiselect field. After ...
5
votes
2answers
227 views

How to mix getContentAsPDF calls with DML?

This critical update: PageReference getContent() and getContentAsPDF() Methods Treated as Callouts will be auto-activated in January 2016. We have some code that uses a queue of custom event ...
5
votes
2answers
5k views

IN operator must be used with an iterable expression : For loop

I am getting Subject header error at below line. Can someone let me know what is the issue? Line: for (Compliance_Incident_abv__c myContact : [select ID,ManagerEmail_abv__c,RepEmail_abv__c,...
3
votes
1answer
503 views

PDF Generation Salesforce

I'm kinda stuck in the middle of all the limitations Salesforce has for creating a pdf out of a Visualforce page. What I have is a Visualforce page that takes some parameters and I use to rerender as ...
5
votes
3answers
1k views

too many nested getContent calls?

I have a Visualforce page that renders perfectly as a PDF that I'd like to attach to an opportunity record and to attach to an email. Whenever the code gets to getContent(), I keep getting an error ...
1
vote
2answers
357 views

Custom settings field error

Although I am having this field in my custom settings it shows Error : Variable does not exist. Please find below code snippet. Can someone let me know what could be the reason? Code Snippet: ...
1
vote
2answers
885 views

How to get the text only from the getcontent method

I have used the following code to get the content of the page but it shows the content along with style, HTML code so how to get content only from the webpage. My Code is : PageReference page = new ...
10
votes
2answers
5k views

generating PDF of a record's printable view in batch apex

Some of my users cannot view the Case object owing to restricted licenses. To avoid paying for service cloud licenses, I need to generate PDF snapshots of all Case records using a batch (the are many ...
7
votes
2answers
3k views

VF PDF(getContent) generates corrupted PDF while using standard controller

Well lately I noticed a weird behaviour of Pagereference getContent() method while using it with a standard controller along with an extension. So here is bit of code to demonstrate the issue. PAGE ...
4
votes
2answers
2k views

getContent() returns Blob PDF-body in console, but HTML page (rendered like PDF) in Email service code

First at all: Happy New Year to you and your family. I wish you all the best in new 2014 year. And about my case: I use 'MyPdfRenderingPage.getContent();' method to get Blob PDF-body, create PDF ...
4
votes
2answers
237 views

Salesforce Timing/Cache issue ?? Update record before generating a VF PDF

I have a custom button which generates and sends an invoice pdf. Just before to generate the pdf, if the issue date of the invoice is null, I set the date to today, then I generate the PDF. The code ...