• SUJAY GANGULY 5
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 4
    Replies
I am a Certified Salesforce Developer, working on Salesforce Development and Administration both.

Please take a look at my website to know me more:-> http://salesforce-freelancer.eu5.org/Home.html

If you looking for any Developer or Administrator to complete your task or project on $10/HR, please feel free to contact me, I love to work with you.

Email: sujay.801389@gmail.com
Geeting error at winter 19 Platfrom Developer 1 maintenance Certification:

Challenge not yet complete in My Trailhead Playground 1
Ensure sharing rules from the calling class are enforced for the the 'UtilityClass' Apex class.

Can you please help?
I want to get a value from List<String>. Mean I am storing 3 records at List<String> after that I want to make a checking using that records at Rest  Api Update Time. Please check the code:

List<String>  RecordValueStore= new  List<String>();
List<Account> Acc= new  List<Account>();

Acc=[Select id, Name, Company__c from Account];
For(Account a:Acc){
if(RecordValueStore.get(0).id==Acc.get(0).id){
System.Debug('HI');
}
If Else(RecordValueStore.get(0).Name==Acc.get(0).Name){
System.Debug('Hello');
}

If Else(RecordValueStore.get(0).Comapny__c==Acc.get(0).Comapny__c){
System.Debug('OHH');
}
Update a;
}
Update Acc;

All are working cool, but the problem is happening at normal lits string means from the "RecordValueStore" I can't take the values at checking. It shows that "Variable does not exist: Comapny__c"
how much budget and point I need to get trailhead t-shirt and jacket?
at Closed Own stage,  will get a Send Terms button (if the Terms type is CREDIT CARD and account type is PREPAID, otherwise the button will be hidden.). will click on the button and a mail will be forwarded with the payment link to the opportunity billing contact email id. Account name and Opportunity name also store in the Inside of the payment link.

please tell me how can I do this. I done lots of R&D but not achieved it.
Hi Guys,

I am an excellent Salesforce Developer/Administrator. Working on Salesforce Classic and Lightning both.

My area of expertise:
1> Salesforce Integration using Rest API.
2> Salesforce Development using Trigger, Batch Job, Apex, Visualforce, Lightning Component.
3> Salesforce Development using Standard feature(Approval Process, Process Builder, Workflow, Email Templates).
4> Salesforce Administration(Standard/Custom Objects,fields,Report,Dashboard).

If you have any projects in Salesforce regarding my knowledge, I will happy to work with you as a part-time remote basic.

My contact Details are listed below.

Thanks,

Sujay

Email: sujay.80138@gmail.com
I am adding a Email Template Id in a custom object test field. Now I want to send email using that field value in another object. I come close but one error is occur. "System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Add a recipient to send an email.: [] ".

Can anyone suggest what should i do?


Here is my Apex code:

Public class ProjectTeamStakeholderTriggerHelper{
    Map<String,String> UserEmailMap;
     public ProjectTeamStakeholderTriggerHelper(){
         UserEmailMap= new Map<String,String>();
         for(User usrId:[select id,email from User]){
             UserEmailMap.put(usrId.id, usrId.Email);
         }
     }
    
    public void ProjectTeamStakeholder(List<Project_Teams_and_Stakeholder_Groups_c> newProjectTeamList, List<Project_Teams_and_Stakeholder_Groups_c> oldProjectTeam){
        //variable declaration
        Map<String,Email_Template_c> EmailTemplateObjMap= new Map<String,Email_Template_c>();
        Set<Id> ProjectTeamStakeholderList= new Set<Id>();
        Set<String> UniqueKeySet= new Set<String>();
        Integer AccountableFlag=0;
        Integer ConsultedFlag=0;
        Integer InformedFlag=0;
        Integer ResponsibleFalg=0;
        List<String> EmailTemplateStandardList = new List<String>();
        List<RACI_Chart_c> EmailRACIList= new List<RACI_Chart_c>();
        List<Id> EmailToUserIds= new List<ID>();
        List<String> SendEmailAddressList= new List<String>();
        Boolean EamilSend=false;
        
        //retrieve all Email Template records
        for(Email_Template_c emailId:[select UniqueNamec,Email_Template_Typec ,Email_Objectc,Organizationc,RACI_Typec,Template_IDc from Email_Template_c]){
            EmailTemplateObjMap.put(emailId.UniqueName__c, emailId);
            
        }
        for(Project_Teams_and_Stakeholder_Groups__c oldTeamSta: oldProjectTeam){
            ProjectTeamStakeholderList.add(oldTeamSta.Id);
            UniqueKeySet.add(oldTeamSta.Organization_c+''+'Project Teams and Stakeholder Groups');//set Uniquekey
        }
        
          //Set flag depending on the Email Template object
       // try{
        for(String uniqueKey:UniqueKeySet){
            Email_Template__c EmailTemplate= EmailTemplateObjMap.get(uniqueKey);
            if(EmailTemplate.Email_Object_c=='Project Teams and Stakeholder Groups'&& EmailTemplate.Email_Template_Typec=='Edit' && EmailTemplate.RACI_Type_c=='Accountable'){
                AccountableFlag=1;
                EmailTemplateStandardList.add(EmailTemplate.Template_ID__c);
                if(EmailTemplate!=null){
                    System.debug('Email tamplate is'+EmailTemplate);
                }
                
            }
        }
        EmailRACIList= [select id,User_c,User_Typec from RACI_Chartc where Project_Teams_and_Stakeholder_Groups_c in :ProjectTeamStakeholderList];
        
         //Set the approverList
        for(RACI_Chart__c RACIChart:EmailRACIList){
            if((AccountableFlag==1 && ConsultedFlag==0 && InformedFlag==0 && ResponsibleFalg==0)&&(RACIChart.User_Type__c == 'Accountable')){
                EmailToUserIds.add(RACIChart.User__c);
            }
        }
         //Email Sending : Start Here
        for(Id UserId: EmailToUserIds){
            SendEmailAddressList.add(UserEmailMap.get(UserId));
        }
        for(Project_Teams_and_Stakeholder_Groups__c OldProTeamSta: oldProjectTeam){
            for(Project_Teams_and_Stakeholder_Groups__c NewProTeamSta:newProjectTeamList){
                if(OldProTeamSta!=NewProTeamSta){
                EamilSend=true;    
                }
            }
        }
       // }
        //Catch(Exception e){
         //   System.debug(e);
       // }
        if(EamilSend){
            system.debug('Email notification for approval submition::::::::'+SendEmailAddressList);
             List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
             Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
             string body = 'Email Template test';
             mail.setSubject('Email Template test');
                    //String[] toAddresses = new String[] {userIdEmailMap.get(IdItr)};
             mail.setToAddresses(SendEmailAddressList);
             mail.setHtmlBody(body);
             mails.add(mail);
             Messaging.sendEmail(mails);
        }
        System.debug(SendEmailAddressList);
        System.debug(EmailTemplateStandardList);
          //Email Sending : End Here
    }
}

here is my trigger:
trigger EmailTemSendTrigger on Project_Teams_and_Stakeholder_Groups__c (before update) {
    
    if(Trigger.isBefore && Trigger.isUpdate){
         
        ProjectTeamStakeholderTriggerHelper helper= new ProjectTeamStakeholderTriggerHelper();
         helper.ProjectTeamStakeholder(trigger.new,trigger.old);
        
    }
}

Email will send when record is edited.
Geeting error at winter 19 Platfrom Developer 1 maintenance Certification:

Challenge not yet complete in My Trailhead Playground 1
Ensure sharing rules from the calling class are enforced for the the 'UtilityClass' Apex class.

Can you please help?
I want to get a value from List<String>. Mean I am storing 3 records at List<String> after that I want to make a checking using that records at Rest  Api Update Time. Please check the code:

List<String>  RecordValueStore= new  List<String>();
List<Account> Acc= new  List<Account>();

Acc=[Select id, Name, Company__c from Account];
For(Account a:Acc){
if(RecordValueStore.get(0).id==Acc.get(0).id){
System.Debug('HI');
}
If Else(RecordValueStore.get(0).Name==Acc.get(0).Name){
System.Debug('Hello');
}

If Else(RecordValueStore.get(0).Comapny__c==Acc.get(0).Comapny__c){
System.Debug('OHH');
}
Update a;
}
Update Acc;

All are working cool, but the problem is happening at normal lits string means from the "RecordValueStore" I can't take the values at checking. It shows that "Variable does not exist: Comapny__c"
Hi Guys,

I am an excellent Salesforce Developer/Administrator. Working on Salesforce Classic and Lightning both.

My area of expertise:
1> Salesforce Integration using Rest API.
2> Salesforce Development using Trigger, Batch Job, Apex, Visualforce, Lightning Component.
3> Salesforce Development using Standard feature(Approval Process, Process Builder, Workflow, Email Templates).
4> Salesforce Administration(Standard/Custom Objects,fields,Report,Dashboard).

If you have any projects in Salesforce regarding my knowledge, I will happy to work with you as a part-time remote basic.

My contact Details are listed below.

Thanks,

Sujay

Email: sujay.80138@gmail.com