• vishwjeet singh
  • NEWBIE
  • 0 Points
  • Member since 2023

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

Internal Salesforce.com error.

We are facing issue while generating pdf, below is the sample code we are using and the last line is causing issue. The code get stuck on line 4 "pdfInstant = samplevfpdf.getContentAsPDF()" and process does not proceed after this line.

// Sample code
Line 1: Blob pdfInstant;

Line 2: pagereference samplevfpdf = new pagereference('https://xxxxx--dotsuat1.my.salesforce.com/InvoiceSendPdf?Id=a1E0r0000032SGPEA2');

Line 3:samplevfpdf.setRedirect(true);

Line 4: pdfInstant = samplevfpdf.getContentAsPDF(); // This the line where code get stuck

I have tried to run this sample code on anonymous window and when line 4 execute we got the screen(please see attached "AnonymousScreenShot" ) . We are using this sample code in our pdf generation process on production and facing Internal Salesforce.com error(Please see attached "ErrorLogWhenProcessRun").

Please look into this asap as it affecting the business.

User-added image
We are trying to limit access to partner specific products and struggle to find a way without constant manual management of user groups. 

Most products are meant to be visible to every sales partner and everyone is meant to be able to sell those, so something like this in regards to visibility: 


User-added image

Other products are meant to be partner specific, so only visible to sales representatives of those partners, which would result in this green visibility: 

User-added image
This means that all Sales Guys from Partner C are meant to see both the company wide products as well as the partner specific products. 

We are using:
- Sales Cloud
- Enterprise License Model for the entire head organization and employees.
- Partner Community (Digital Experience) for the Sales Partners. 
- Lightning Environment

Any ideas, on how we can get this done? We are struggling to wrap our head around this for some reason and require an external opinion...