• babaKhan
  • NEWBIE
  • 0 Points
  • Member since 2014
  • Salesforce App Developer/Software Engineer
  • Holy

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Hi,

I'm facing a problem regarding PageReference object. When I use the following code in Scratch Org and push the Package to client Org then all works as expected:
     PageReference pdf = Page.pageName;
     pdf.getParameters().put('id',si.id);    
     pdf.setRedirect(true);     
     Blob b  = pdf.getContent();     //it works and blob content created to insert the document record
 
However, updating the code like following only works in Scratch Org but failed when moving Package to client org.
     PageReference pdf = new PageReference('/apex/'+si.Invoice_Template__r.Visualforce_Page__c);
     pdf.getParameters().put('id',si.id);    
     pdf.setRedirect(true);     
     Blob b = pdf.getContent();     //this fails to execute and the following error thrown
 
ERROR MESSAGE: Argument 2 cannot be null Error is in expression '{!methodName}' in component <apex:page> in page namespace:className: External entry point
 
Looking forward to get some help on this please. Thanks
I want to capture Chatter's LIKE event in Apex. Is there any way to achieve it. Any solution(s)?
Hi Community,
I've gone in help docs of SFDC, and found following:
User-added image
In Note, they're clearly saying to choose hiding tabs. My questions is that, how can we hide all tabs. According to my recent work, we must add one tab to this template. Is there any option lie here to hide all tabs, or anyways to get rid of these? Thanks for your helps!
Hi,

I'm facing a problem regarding PageReference object. When I use the following code in Scratch Org and push the Package to client Org then all works as expected:
     PageReference pdf = Page.pageName;
     pdf.getParameters().put('id',si.id);    
     pdf.setRedirect(true);     
     Blob b  = pdf.getContent();     //it works and blob content created to insert the document record
 
However, updating the code like following only works in Scratch Org but failed when moving Package to client org.
     PageReference pdf = new PageReference('/apex/'+si.Invoice_Template__r.Visualforce_Page__c);
     pdf.getParameters().put('id',si.id);    
     pdf.setRedirect(true);     
     Blob b = pdf.getContent();     //this fails to execute and the following error thrown
 
ERROR MESSAGE: Argument 2 cannot be null Error is in expression '{!methodName}' in component <apex:page> in page namespace:className: External entry point
 
Looking forward to get some help on this please. Thanks
I want to capture Chatter's LIKE event in Apex. Is there any way to achieve it. Any solution(s)?
How does one add the Salesforce Trailhead Badges (link) on their Linkedin Profile? When I edit my Linkedin profile where do I do this?
Thanks!