• Lakshmi Priya 42
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Requirement Is from an external URL we will get a PDF and have to download that PDF (VFPage).
Apex Code :
HTTPResponse response = Continuation.getResponse(reqLabel); if((response.getStatusCode() != 200 && response.getBody().LEFT(10) != '"fault"') || (response.getStatusCode() == 200 && response.getBody().LEFT(10).contains('"fault"'))) { faultObj = PartnerInvoiceServiceUtility.parsePDFResponse(response.getBody()); System.debug('faultobj '+faultobj); } if(faultObj == null) { Map<String,object> lst_JsonParse = (Map<String,object>)Json.deserializeUntyped(response.getBody()); string invoicePDFURL = (string)(lst_JsonParse.get('invoicePdfUrl')); system.debug('invoicePDFURL> ' + invoicePDFURL); Http h = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint(invoicePDFURL); req.setMethod('GET'); req.setHeader('Content-Type', 'application/pdf'); //Now Send HTTP Request system.debug('retFile req ' + req); HttpResponse res = h.send(req); system.debug('retFile response ' + res); system.debug('retFile response body ' + res.getBody()); invoicePDF = EncodingUtil.base64Encode(res.getBodyAsBlob()); // Passing this to VF Page system.debug('invoicePDF > ' + invoicePDF); pdfGenerated = true; //Passing this to VF Page
VF Page
<apex:outputPanel id="dummyPanel"> {!invoicePDF}
<script> console.log('In Dummy Panel...'); var isPDFGenergated = {!pdfGenerated}; if(isPDFGenergated){ debugger; console.log('PDF Genrated Flag: True'); var invoiceBlob = '{!invoicePDF}'; exportActualFileToPDF2('download'); $jq('#pdfError').hide(); console.log('hiding spinner now'); hideSpinner(); } if('{!system_pdferrormessage}'!= null && '{!system_pdferrormessage}' !='') { console.log('Exception: System Error ' + '{!system_pdferrormessage}'); $jq('#pdfError').show(); $jq('#pdfError').html('{!system_pdferrormessage}'); } </script>
On rerender in VF page, we are calling dummy panel function. But rerender is not happening and getting "Failed to load resource: the server responded with a status of 500 (Server Error)" and Status Code: 500 Server Error Referrer-Policy: strict-origin-when-cross-origin
Ways followed to fix this error:
Whitelisted the URL getting from external in CORS
Also created remote site settings for that URL
Nothing fixed our issue

User-added image
Hello Trailblazers!

I'm stuck on last challenge for LEX Specialist Superbadge, and I've been trying all corrections proposed on the feeds I've found, but none of it is working, so I'm starting a new post to try to see it clearer (and maybe discuss only on last version of the SB, which seems to have evolved a lot on past 2 years)...
Existing posts I've gone through:
https://developer.salesforce.com/forums/?id=906F0000000kFtrIAE
https://developer.salesforce.com/forums/?id=906F0000000kKecIAE
https://developer.salesforce.com/forums/?id=906F0000000BXDeIAO#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=906F0000000kEDkIAM (it has some discussion over challenge #9 in the middle)

Maybe my problem has to do with the SB being started 2 years ago on my side, on a Trailhead Playground which I cannot access anymore. I've started over on a brand new TP, but I might have stumble on a previous steps that I didn't need to re-validate?

As many people, I'm getting the following error when trying to complete the challenge:
"Challenge Not yet complete... here's what's wrong:
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type."

So, what I'm doing:
  • Create a Report from standard "Opportunities with Adventures" Report Type
  • Name it "Opp Stage by Adventure"
  • Filter on "Product Date" from 1/12026 to 12/1/2026 (and getting results)
  • Remove filter on "stage"
  • Add a vertical-stacked bar graph named "Adventure Stage Comparison"
  • On "Adventure record Lightning page", create a tab called "Adventure comparison" and inserted my newly created graph, with label "Adventure Stage Comparison"

What I have tried already :
  • Log out/log in of sandbox & Trailhead. Also after waiting for a day.
  • Change grouping order in graph: Adventure first & Stage second // Stage first & Adventure second
  • Change y-axis from "record count" to "sum of amount"
  • Use "Product Name" standard field or created "Adventure name" which I populated with same values than Product Name
  • Change folder in which the report is in: from "Unfiled Public Report" to a created folder which I shared with all users.
  • Create the report in LEX (Lightning report or Classic report in LEX) or in Classic interface
  • Create a custom Report Type "Opportunities with Adventures", but I cannot find the fields "Adventure Name" & "Product Date" to add them
  • Check there are no other Reports with a similar name "Opp Stage by Adventure"
  • Change the My Domain setting for background color
  • Check for "paused flows" (even if I do not see the link, it was hinted as a potential problem in a thread)

Some questions I still ask myself:
  • I renamed Product object to Adventure, but I cannot rename standard fields such as Product Name or Product Date. And I see "Adventure Name" being used on screenshots in threads.
  • Shouldn't I receive an email when successfully changing My Domain settings?
  • Am I just plain crazy and missing something obvious?
  • Should I start over the whole superbadge on a brand new Trailhead Playground, and is there a way to "uncheck" previous challenges?
Any help or insight is welcome, thanks in advance!

Quentin
I am get this error: "Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type".

I believe i configured the report according to the instructions but it is still showing and error. Any assistance or insight would be apreciated.