• Nidish G 6
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 0
    Replies

We have a scheduled flow to update owner names for Accounts based on some criteria, the Automated user needs to have syatem admin privilages in order to overcome to Validation rule. So, we are trying to provide permission sets to Automated user.

We got a workaround for this in IdeaExchange portal.

1] Create a permission set and check the required permissions. Let’s say the name of this permission set is ‘Automated_Process’.
2] Assign this permission set by running the script below in anonymous block:=============
PermissionSet permissionSet = [ SELECT Id, Name FROM PermissionSet WHERE Name = ‘Automated_Process’ ]; User automatedUser = [ SELECT Id, Name FROM User WHERE Name = ‘Automated Process’ ]; PermissionSetAssignment pa = new PermissionSetAssignment( PermissionSetId = permissionSet.Id, AssigneeId = automatedUser.Id ); insert pa;

However, even that seems to be not working.

Please help!!

Thank You!!

Is there any way to optimize the flow in order to avoid soql limits

Hello All,

I have received an email from Salesforce stating "You have one or more certificates in your Salesforce org Celigo, Inc 00D30000000LHK8 that will expire soon. Review the list below and visit Certificate and Key Management from Setup to make an update.

   - SelfSignedCert_10Apr2020_011042, Self-Signed, expires on 4/10/2021. Warning: This certificate will expire in 30 day(s)."

What actions should I take as an Admin to check if we have used this certificate anywhere in our org.?
How to check if we have used this certificate in our org?
Is this certificate used in custom domains?
What actions should be taken if this certificate is not used anywhere?

What all needs to be checked/tested as a Salesforce developer when an Salesforce org gets upgraded due to scheduled maintenance Spring 21
We need 3 custom fields on Account object:
1. Count of Closed Won Opportunities for Curent year
2. Count of Closed Won Opportunities for current quarter
3. Count of Closed Won Opportunities for current month
We have a flow which creates Quote templates when we click a custom button called "Generate PDF". I am able to create a template when I try to debug the flow. But when I hit the GeneratePDF button it creates a blank PDF instead of PDF based on templates.

The below is my apex class which accepts two input parameters from the flow:
1. Quote ID
2. Template ID


public class generateQuotePdfDocument_2{

@InvocableMethod(label='Invoke Apex')
    public static void invokeThisMethod(List<FlowInputs> request) {
    
    createQuoteFutureMethod(request);
        
    }
    
    //input details that comes to apex from flow
    public class FlowInputs{
    
        @InvocableVariable
        public String qID;
        
        @InvocableVariable
        public String QuoteTemplateID;
        
    }
    

public static void createQuoteFutureMethod (List<FlowInputs> request) {
//Id of Quote record.
String QuoteID = request[0].qID;
//String QuoteID = '0Q0020000008VfGCAU';
 
//Id of quote Template
String templateID = request[0].QuoteTemplateID;
//String templateID = '0EH0M000000sssO';

system.debug('This is request object: '+request);
system.debug('This is request[0] object: '+request[0]);
 
//This Url create the pdf for quote
String quoteUrl = '/quote/quoteTemplateDataViewer.apexp?id=';
 
quoteUrl +=QuoteID;
 
quoteUrl +='&headerHeight=190&footerHeight=188&summlid=';
 
quoteUrl +=templateID ;
 
quoteUrl +='#toolbar=1&navpanes=0&zoom=90';
system.debug('This is quoteURL object: '+quoteUrl);
 
//Create pdf content
PageReference pg = new PageReference(quoteUrl) ;
 
//Document object of quote which hold the quote pdf
QuoteDocument quotedoc = new QuoteDocument(); 
 
//Get the content of Pdf.
Blob b = pg.getContentAsPDF() ;
 
//content assign to document
quotedoc.Document = b;
 
//assign quote id where pdf should attach
quotedoc.QuoteId = QuoteID ;
 
//insert the quotdoc
 insert quotedoc; 
 
 }}