• ramesh
  • NEWBIE
  • 90 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 25
    Questions
  • 41
    Replies
hi
i have one vf page in account  as render as pdf , now when ever account creted i need to send email with pdf of vf page 
i have account obj in i have one check box  so i am print that page in vf page how o fetch that value and in front end show value
how to fetch role and subordinates underhim for apex contrler 
hi i have one object called information   in this i had one field lookup with user  so  i created one button action using aura , now i clicked on that button i need to send email to person whos in the lookup field using aura 
 In contact object I had 280 fields. I  want 280fields with my custom object is it possible with out code and manual creation 
  • April 17, 2023
  • Like
  • 0
Hi All,
how we can move notes and attachments from one account to another account through code?
Kindly help me with this.
  • April 05, 2023
  • Like
  • 0
hai,
i am creating survey invitaion throug to mail i am getting error

This page has an error. You might just need to refresh it. Error in $A.getCallback() [Cannot read properties of null (reading '0')] Callback failed: serviceComponent://ui.survey.components.controller.SurveyEmailController/ACTION$loadTemplate Failing descriptor: {survey:surveyEmailWizard}

but if i use admin profile its working fine but i used marketing usr profile i am getting error
  • March 29, 2023
  • Like
  • 0
after send mail to end customer the invitation  name same like as  (recipient  name)
  • March 07, 2023
  • Like
  • 0

This page has an error. You might just need to refresh it. Error in $A.getCallback() [Cannot read properties of null (reading '0')] Callback failed: serviceComponent://ui.survey.components.controller.SurveyEmailController/ACTION$loadTemplate Failing descriptor: {survey:surveyEmailWizard}
  • March 01, 2023
  • Like
  • 0
In survey when activating I am getting this error


You can't activate this survey version. Either another version is referenced by one or more objects or you don't have the required permissions.
  • February 28, 2023
  • Like
  • 0
trigger code need
record type  id: 012Bg000000INcTIXX
when the stage will be 'converted - closed'   auto generate  account and contact and opportunity  based on record type (in after insert & after update)
 
  • December 02, 2022
  • Like
  • 0
Whenever an Opportunity is Created, Updated and Deleted then
Roll-up the Opportunity amount to Account's Annual Revenue
  • November 30, 2022
  • Like
  • 0

cornexepresion 
system.schedule('jobNametest1111', '1,59,23,*,*,1-7', new batchschedual2());





my schedule program 
global  class batchschedual2 implements system.Schedulable
{
    global void execute(system.SchedulableContext scontext)
    {
       
        database.executeBatch(new batchannualrevenue());
    }

}






my batch program
global class batchannualrevenue implements database.Batchable<sobject>,database.stateful
{
    decimal totalrevenue =0.0;
    global database.QueryLocator start(database.BatchableContext bcontext)
        {
            return database.getQueryLocator([select id,name,annualrevenue from account where annualrevenue != null]);
        }
    global void execute(database.BatchableContext bcontext,list<sobject> recordstiprocess)
    {
        for(sobject records:recordstiprocess)
        {
            account accsrec = (account)records;
            totalrevenue +=accsrec.annualrevenue;
        }
    }
    global void finish(database.BatchableContext bcontext)
    {
        system.debug('bcontext id is========='+bcontext.getJobId());
        
        asyncapexjob jobdetails =[select id,status,numberoferrors,totalJobItems,jobitemsprocessed,createdby.email from asyncapexjob where id =:bcontext.getJobId()]; 
        //===========================
        BatchJobNotificationsHelper.SendBatchJobStatusNotification(jobdetails, totalrevenue, 'batchannualrevenue');
    }      
}
public class acc_contact_num_rollup 
{
    public static Void InsertMethod(list<Contact> lstCon ){
        List<Account> accList=new List<Account>();

    Set<Id> setAccIds = new Set<Id>();
         for(Contact con : lstCon){ 
            if(con.AccountId != null){
                   setAccIds.add(con.AccountId);      
            }   
        }
        for(Account acc :[Select id,Number_of_Contact__c ,(Select id,name from contacts) from Account where Id in : setAccIds]){
     
        acc.Number_of_Contact__c = acc.contacts.size();
       
        acclist.add(acc);
    }
    if(!acclist.isempty()){
        update accList; 
    }
    }
    public static Void UpdateMethod(list<Contact> lstCon,map<Id,Contact>oldmap ){
        List<Account> accList=new List<Account>();

    Set<Id> setAccIds = new Set<Id>();
         for(Contact con : lstCon){ 
            if(con.AccountId != null){
                   setAccIds.add(con.AccountId); 
                setAccIds.add(oldMap.get(con.Id).AccountId);
            }   
        }
        for(Account acc :[Select id,Number_of_Contact__c ,(Select id,name from contacts) from Account where Id in : setAccIds]){
     
        acc.Number_of_Contact__c = acc.contacts.size();
       
        acclist.add(acc);
    }
    if(acclist.size()>0){
        update accList; 
    }
    }
    public static Void deleteMethod(list<Contact> lstCon){
        List<Account> accList=new List<Account>();

    Set<Id> setAccIds = new Set<Id>();
         for(Contact con : lstCon){ 
            if(con.AccountId != null){
                   setAccIds.add(con.AccountId);      
            }   
        }
        for(Account acc :[Select id,Number_of_Contact__c ,(Select id,name from contacts) from Account where Id in : setAccIds]){
     
        acc.Number_of_Contact__c = acc.contacts.size();    
        acclist.add(acc);
    }
    if(acclist.size()>0){
        update accList; 
    }
    }

}
public class acc_contact_num_rollup 
{
    public static Void InsertMethod(list<Contact> lstCon ){
        List<Account> accList=new List<Account>();

    Set<Id> setAccIds = new Set<Id>();
         for(Contact con : lstCon){ 
            if(con.AccountId != null){
                   setAccIds.add(con.AccountId);      
            }   
        }
        for(Account acc :[Select id,Number_of_Contact__c ,(Select id,name from contacts) from Account where Id in : setAccIds]){
     
        acc.Number_of_Contact__c = acc.contacts.size();
       
        acclist.add(acc);
    }
    if(!acclist.isempty()){
        update accList; 
    }
    }
    public static Void UpdateMethod(list<Contact> lstCon,map<Id,Contact>oldmap ){
        List<Account> accList=new List<Account>();

    Set<Id> setAccIds = new Set<Id>();
         for(Contact con : lstCon){ 
            if(con.AccountId != null){
                   setAccIds.add(con.AccountId); 
                setAccIds.add(oldMap.get(con.Id).AccountId);
            }   
        }
        for(Account acc :[Select id,Number_of_Contact__c ,(Select id,name from contacts) from Account where Id in : setAccIds]){
     
        acc.Number_of_Contact__c = acc.contacts.size();
       
        acclist.add(acc);
    }
    if(acclist.size()>0){
        update accList; 
    }
    }
    public static Void deleteMethod(list<Contact> lstCon){
        List<Account> accList=new List<Account>();

    Set<Id> setAccIds = new Set<Id>();
         for(Contact con : lstCon){ 
            if(con.AccountId != null){
                   setAccIds.add(con.AccountId);      
            }   
        }
        for(Account acc :[Select id,Number_of_Contact__c ,(Select id,name from contacts) from Account where Id in : setAccIds]){
     
        acc.Number_of_Contact__c = acc.contacts.size();    
        acclist.add(acc);
    }
    if(acclist.size()>0){
        update accList; 
    }
    }

}
hi
i have one vf page in account  as render as pdf , now when ever account creted i need to send email with pdf of vf page 
i have account obj in i have one check box  so i am print that page in vf page how o fetch that value and in front end show value
Hi All,
how we can move notes and attachments from one account to another account through code?
Kindly help me with this.
  • April 05, 2023
  • Like
  • 0
hai,
i am creating survey invitaion throug to mail i am getting error

This page has an error. You might just need to refresh it. Error in $A.getCallback() [Cannot read properties of null (reading '0')] Callback failed: serviceComponent://ui.survey.components.controller.SurveyEmailController/ACTION$loadTemplate Failing descriptor: {survey:surveyEmailWizard}

but if i use admin profile its working fine but i used marketing usr profile i am getting error
  • March 29, 2023
  • Like
  • 0
after send mail to end customer the invitation  name same like as  (recipient  name)
  • March 07, 2023
  • Like
  • 0

This page has an error. You might just need to refresh it. Error in $A.getCallback() [Cannot read properties of null (reading '0')] Callback failed: serviceComponent://ui.survey.components.controller.SurveyEmailController/ACTION$loadTemplate Failing descriptor: {survey:surveyEmailWizard}
  • March 01, 2023
  • Like
  • 0
Whenever an Opportunity is Created, Updated and Deleted then
Roll-up the Opportunity amount to Account's Annual Revenue
  • November 30, 2022
  • Like
  • 0