• kavya mareedu
  • NEWBIE
  • 70 Points
  • Member since 2018
  • Salesforce Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 24
    Questions
  • 31
    Replies
I have integrated my OutLook and Salesforce. User-added image
Now when I logged in to my Salesforce account, I clicked on create and tried to send an email. But I don't see that option at all. SendEmail is one of the Global actions. I find many other Global Actions but SendEmail is not there. Please suggest me what needs to be done.
Hello Team,

You see I am exhausted with all the playGrounds. I want to start doing my superbadges for that I need atleast two new playgrounds. 

Can I create a new org for myself and link it with the old one so that all my points badges get linked to the new org. 

Will this work out??
Or you guys have anything else to suggest me on this
From the toolbox, drag the Apex Action element onto the canvas.
For Apex Action, enter BankService and select BankService_addAccount.
For Label, use Add Employee Record.
Under Set Input Values, select to include accountName and accountType. For accountName, enter Name and select Name_on_Account. For accountType, enter Type and select Account_Type.
Select Set Output Values.
For accountDetails_type_201, click New Resource to create a variable with these properties.
Resource Type: Variable.
API Name: accountTypeField
Data Type: Record
Object: User
Availability Outside the Flow: Available for output
Click Done.
For accountDetails_type_201, enter account, click > next to the accountTypeField variable you created, and selectAccount_Type__c. This way, when the Apex action finishes, the flow stores the value of accountDetails_type_201 in a specific field on the accountTypeField variable.
Click Done.

Soon after dragging the ApexAction into the canvas I am not able to find BankService. Why is this like this???

Help me I am stuck here still not able to figure out
I am working On Business Administration Super Badge people. When I am trying to import the File they are asked me to do via data Loader I am not able to do it. When I checked the Login History it says API security Token required. When I reset the security token and tried to loggin back it gives me the same error. How should I achieve my challenge 1. It's more than 3 hours I am not able to fix it. Please help me folks.

I have to write a test class for the below schedule apex class, That too with 100% code coverage and system assert equals. How should I start what to do please help me. I really really need all you guys support.

global class DailyPrintbleAndDossierScheduler implements Schedulable
{
    global void execute(SchedulableContext ctx)
    {
        database.executeBatch(new BrokerDataAggregateResultDeleteBatch());
        database.executeBatch(new BrokerDataTopOfficesDeleteBatch());
        database.executeBatch(new BrokerDataSummaryDeleteBatchController());
    }
}

I want to retrieve all the fields from record type of an particular SObject. Please do let me know how to write the SOQL Query on this.
Hello SFDC Family,

Today I was doing a challenge in trailhead and the name of it is "
Create New Users and Allow a User to Delete Accounts" . In this challenge I have to create 4 users and for one user I have to give extra permission to delete the record. My issue is we only have limit for 3 salesforce Platform licenses in Developer Edition then why is in the challenge it is asking us to create 4 users with Salesforce Platform Licenses. How Should I overcome this and complete the challenge?
Topic Name: 
Extend Your Reporting Strategy with the AppExchange


Challenge is:

You’ve been asked to create a new Lead trending dashboard. Rather than creating the dashboard from scratch, install a CRM adoption dashboard package from AppExchange in your Trailhead Playground and update one of the dashboard components as specified below. (Note: While it's a best practice to clone a dashboard before you modify it, for this example, you can go ahead and edit the dashboard directly.)
Get your username and password for your Trailhead Playground using the instructions in this article
Install Salesforce Adoption Dashboards from AppExchange into your Trailhead Playground
Refresh the 3 - Sales & Marketing Adoption dashboard in the Salesforce Adoption Dashboards folder at least once
In the 3 - Sales & Marketing Adoption dashboard, edit the New LEAD Trend by Source component and uncheck the Use chart as defined in source report option
Change the dashboard component for New LEAD Trend by Source to a pie chart and set the wedges to Lead Source
Save your changes
Having trouble installing your app? Read this article for help
I want to collect past 5 years data for a scenerio, let's say data from 2019,2018,2017,2016,2015.

I want to label 2019 data as Current_Year
2018 as Previous_Year
2017,2016,2015 as what??? Do you guys have any suggestion for me.

I don't want to hard code the years in number

Any suggestions please??????????????
While writing a SOQL Query if we have to group by a picklist value, how should I define it. 
I need help in writing a batch apex class. I have two custom objects Agg_Datas_c and Agg_Datas_Final_c

In the two objects we have same fields they are called 18 GWP,19 GWP, 18 commission, 19 commission also a picklist field. 

I have a write a batch apex class in such a way that I should fetch the aggregate data from database in start method. 

In execute method I have to calculate variance and variancepercent

In finish method I have to put the data in other object. I am stuck in middle please help me.

global class Batch_AggregateDataTransfer implements Database.Batchable<sObject> {
    //start method to fetch the aggregate data from Database.
    global Database.QueryLocator start(Database.BatchableContext BC){
        string query ='SELECT SUM(X2018_GWP__c),SUM(X2019_GWP__c) FROM Agg_Data_c__c';
        return Database.getQueryLocator(query);
    }
    global void execute(Database.BatchableContext BC, List<Agg_Data_c__c> Batch){
        for(Agg_Data_c__c obj_Agg: Batch){
            AggregateResult ar = (AggregateResult)obj_Agg;
            Double counter1 = Double.valueOf(ar.get('X2018_GWP__c'));
            Double counter2 = Double.valueOf(ar.get('X2019_GWP__c'));
            Double variance=counter1-counter2;
            Double variancePercent= (counter1-counter2)*0.01;
            
        }
    }
    global void finish(Database.BatchableContext BC){
        {
            
        }
        
    }
    
}
Ans:  Text, Text Area, Text Area Long, Rich Text Area, URL. Is this is the right answer or is there something else????

13. Can we change the data type from Text to Auto Number for the Name when we already have?

Ans: I feel the answer is yes. If yes, please do let me know the explanation . If no, let me know the reason as well. Thanks guys. 

 
public class Colors {
    public string colors;
    public List<string> myList;
    public set<string> newList;
    
    public colors(){
        myList=new List<string>{'Blue','Blue violet','Red','Green','Dark Red','Light Red','Orange Red','Coral Red',
            'Forest Green','Hunter Green','Sage Green','Black','Red','Orange','Yellow','Blue violet'};
                system.debug(myList.size()); 
 newList=new set<string>();
        newList.addAll(myList);
        system.debug(newList);
}
Here is my program:

public class Outbound_Example_3 {
    public void invoke(){
        Messaging.SingleEmailMessage msg =new Messaging.SingleEmailMessage();
        Contact con=[select id ,AccountId from Contact where createdDate=TODAY];
        msg.setTargetObjectId(con.Id);
        msg.setWhatId(con.AccountId);
        EmailTemplate et =[select id from EmailTemplate where name='Case Response'];
        msg.setTemplateId(et.id);
        
        Document doc =[select id,Name,Body,ContentType ,Type from Document where name='Email Messaging'];
        Messaging.EmailFileAttachment eft1 =new Messaging.EmailFileAttachment();
        eft1.setFileName(doc.Name+doc.type);
        eft1.setBody(doc.body);
        eft1.setContentType(doc.ContentType);
        
        PageReference p=Page.EmailSerc;
        Blob body=p.getContentAsPDF();
        Messaging.EmailFileAttachment eft2 =new Messaging.EmailFileAttachment();
        eft2.setFileName('EmailSerc');
        eft2.setBody(body);
        List<Messaging.EmailFileAttachment> files =new List<Messaging.EmailFileAttachment>{eft1,eft2};
        msg.setFileAttachments(files);
        Messaging.Email[] emails =new Messaging.Email[]{msg};
        Messaging.sendEmail(emails);    
        
    }
}


Outbound_Example_3 ou=new Outbound_Example_3();
ou.invoke();


Please let me know where am I going wrong.
Thanks!
Hello,

I am a 'Ranger' now and I want to know when will I get my hoodie !!!

 
My question is: When ever lead is inserted, with leadsource as web set wilson as owner of record. If the leadsource is other than web then assign it to lifeQueue as owner.

Ans:

public class Lead_Example {
    
    User u= [Select id from User where FirstName LIKE 'wilson'];
    group g= [Select id from Group where type='Queue' and name='LifeQueue'];
    public static void callMe(List<Lead> leads) 
    {
        for(Lead l: leads)
        {
            if(l.LeadSource=='web')
            {
                l.OwnerId= u.id;
            }else{
                l.OwnerId=g.id;
            }
        }
    }
}

Trigger Callout:
trigger Lead_Example on Lead (before insert) {
    List<Lead> leads=Trigger.new;
    
    Lead_Example.callMe(Trigger.new);
    
}

}Please Help!!!!!


In the above example, I need to write a trigger in such a way that whenever I create a new contact an email should be sent to me with the details also the count of number of triggers.

I have written this class for the above example:

public class EmailManager {
    public static void sendMail(List<contact> contacts)
    {
        for(Contact c: contacts)
        {
            if(c.email!=null)
            {
                c.email='kavya@system.in';
            }
        }
  
    }
    

}

This is the trigger:

trigger ExampleTrigger on Contact (after insert,after delete) {
    list<contact> contact= Trigger.new;
    if(Trigger.isInsert){
        Integer recordcount= Trigger.new.size();
        EmailManager.sendMail('kavya@system.in','Trailhead Trigger Tutorial',  recordcount+'contact(s) were inserted.');
    }else if(Trigger.isDelete){
        Integer recordcount = Trigger.new.size();
        
    }
public class Cus_Inv_Exmp1 {
    public static void callMe(List<APEX_Customer__c> customers )
    {  
        List<APEX_Invoice__c> InvoiceList=new List<APEX_Invoice__c>();
        for(APEX_Customer__c objCust:customers)
        {   
            if(objCust.APEX_Customer_Status__c=='Active')
            {
                APEX_Invoice__c objInvoice=new APEX_Invoice__c();
                objInvoice.APEX_Status__c='Active';
                objInvoice.APEX_Description__c='Recored created through trigger';
                objInvoice.APEX_Customer__c=objCust.id;
                InvoiceList.add(objInvoice);
                
            }
            
        }
      Insert  InvoiceList;//DML
    }
}


Callout for Trigger :

trigger Cus_Inv_Exmp1 on APEX_Customer__c (after update)
{

     Cus_Inv_Exmp1.callMe(Trigger.new);   
}
Ans:  Text, Text Area, Text Area Long, Rich Text Area, URL. Is this is the right answer or is there something else????

13. Can we change the data type from Text to Auto Number for the Name when we already have?

Ans: I feel the answer is yes. If yes, please do let me know the explanation . If no, let me know the reason as well. Thanks guys. 

 
I am working On Business Administration Super Badge people. When I am trying to import the File they are asked me to do via data Loader I am not able to do it. When I checked the Login History it says API security Token required. When I reset the security token and tried to loggin back it gives me the same error. How should I achieve my challenge 1. It's more than 3 hours I am not able to fix it. Please help me folks.

I have to write a test class for the below schedule apex class, That too with 100% code coverage and system assert equals. How should I start what to do please help me. I really really need all you guys support.

global class DailyPrintbleAndDossierScheduler implements Schedulable
{
    global void execute(SchedulableContext ctx)
    {
        database.executeBatch(new BrokerDataAggregateResultDeleteBatch());
        database.executeBatch(new BrokerDataTopOfficesDeleteBatch());
        database.executeBatch(new BrokerDataSummaryDeleteBatchController());
    }
}

Topic Name: 
Extend Your Reporting Strategy with the AppExchange


Challenge is:

You’ve been asked to create a new Lead trending dashboard. Rather than creating the dashboard from scratch, install a CRM adoption dashboard package from AppExchange in your Trailhead Playground and update one of the dashboard components as specified below. (Note: While it's a best practice to clone a dashboard before you modify it, for this example, you can go ahead and edit the dashboard directly.)
Get your username and password for your Trailhead Playground using the instructions in this article
Install Salesforce Adoption Dashboards from AppExchange into your Trailhead Playground
Refresh the 3 - Sales & Marketing Adoption dashboard in the Salesforce Adoption Dashboards folder at least once
In the 3 - Sales & Marketing Adoption dashboard, edit the New LEAD Trend by Source component and uncheck the Use chart as defined in source report option
Change the dashboard component for New LEAD Trend by Source to a pie chart and set the wedges to Lead Source
Save your changes
Having trouble installing your app? Read this article for help
I need help in writing a batch apex class. I have two custom objects Agg_Datas_c and Agg_Datas_Final_c

In the two objects we have same fields they are called 18 GWP,19 GWP, 18 commission, 19 commission also a picklist field. 

I have a write a batch apex class in such a way that I should fetch the aggregate data from database in start method. 

In execute method I have to calculate variance and variancepercent

In finish method I have to put the data in other object. I am stuck in middle please help me.

global class Batch_AggregateDataTransfer implements Database.Batchable<sObject> {
    //start method to fetch the aggregate data from Database.
    global Database.QueryLocator start(Database.BatchableContext BC){
        string query ='SELECT SUM(X2018_GWP__c),SUM(X2019_GWP__c) FROM Agg_Data_c__c';
        return Database.getQueryLocator(query);
    }
    global void execute(Database.BatchableContext BC, List<Agg_Data_c__c> Batch){
        for(Agg_Data_c__c obj_Agg: Batch){
            AggregateResult ar = (AggregateResult)obj_Agg;
            Double counter1 = Double.valueOf(ar.get('X2018_GWP__c'));
            Double counter2 = Double.valueOf(ar.get('X2019_GWP__c'));
            Double variance=counter1-counter2;
            Double variancePercent= (counter1-counter2)*0.01;
            
        }
    }
    global void finish(Database.BatchableContext BC){
        {
            
        }
        
    }
    
}
Hi  i am new in Salesforce
I am Beginner
So Please Help me Out from this Scenario

When an Account's Billing Zip/Postal Code field value is changed and entered new value then
this situation will occur
1.Change the Account Owner to the Sales Representative assigned to the new zip code(Sales Representative is users that will be in another custom Object Terriotry object its a lookup )
2.Change the Owner Field of all the Account's Contacts to the same Sales Representative
3.Change the Owner Field of all the Account's Open Opportunities to the Same Sales RepresentativeIn this Image this are the Sales Representative in Custom Object TerritoryIn this Image This are the Custom fileds of territory objectSo Please Help Me out From this Scenario How to Start From where i dont know 

Please Reply As Soon Possible

Thanks
Neeraj Sharma
public class Colors {
    public string colors;
    public List<string> myList;
    public set<string> newList;
    
    public colors(){
        myList=new List<string>{'Blue','Blue violet','Red','Green','Dark Red','Light Red','Orange Red','Coral Red',
            'Forest Green','Hunter Green','Sage Green','Black','Red','Orange','Yellow','Blue violet'};
                system.debug(myList.size()); 
 newList=new set<string>();
        newList.addAll(myList);
        system.debug(newList);
}
Here is my program:

public class Outbound_Example_3 {
    public void invoke(){
        Messaging.SingleEmailMessage msg =new Messaging.SingleEmailMessage();
        Contact con=[select id ,AccountId from Contact where createdDate=TODAY];
        msg.setTargetObjectId(con.Id);
        msg.setWhatId(con.AccountId);
        EmailTemplate et =[select id from EmailTemplate where name='Case Response'];
        msg.setTemplateId(et.id);
        
        Document doc =[select id,Name,Body,ContentType ,Type from Document where name='Email Messaging'];
        Messaging.EmailFileAttachment eft1 =new Messaging.EmailFileAttachment();
        eft1.setFileName(doc.Name+doc.type);
        eft1.setBody(doc.body);
        eft1.setContentType(doc.ContentType);
        
        PageReference p=Page.EmailSerc;
        Blob body=p.getContentAsPDF();
        Messaging.EmailFileAttachment eft2 =new Messaging.EmailFileAttachment();
        eft2.setFileName('EmailSerc');
        eft2.setBody(body);
        List<Messaging.EmailFileAttachment> files =new List<Messaging.EmailFileAttachment>{eft1,eft2};
        msg.setFileAttachments(files);
        Messaging.Email[] emails =new Messaging.Email[]{msg};
        Messaging.sendEmail(emails);    
        
    }
}


Outbound_Example_3 ou=new Outbound_Example_3();
ou.invoke();


Please let me know where am I going wrong.
Thanks!
Hello,

I am a 'Ranger' now and I want to know when will I get my hoodie !!!

 
My question is: When ever lead is inserted, with leadsource as web set wilson as owner of record. If the leadsource is other than web then assign it to lifeQueue as owner.

Ans:

public class Lead_Example {
    
    User u= [Select id from User where FirstName LIKE 'wilson'];
    group g= [Select id from Group where type='Queue' and name='LifeQueue'];
    public static void callMe(List<Lead> leads) 
    {
        for(Lead l: leads)
        {
            if(l.LeadSource=='web')
            {
                l.OwnerId= u.id;
            }else{
                l.OwnerId=g.id;
            }
        }
    }
}

Trigger Callout:
trigger Lead_Example on Lead (before insert) {
    List<Lead> leads=Trigger.new;
    
    Lead_Example.callMe(Trigger.new);
    
}

}Please Help!!!!!


In the above example, I need to write a trigger in such a way that whenever I create a new contact an email should be sent to me with the details also the count of number of triggers.

I have written this class for the above example:

public class EmailManager {
    public static void sendMail(List<contact> contacts)
    {
        for(Contact c: contacts)
        {
            if(c.email!=null)
            {
                c.email='kavya@system.in';
            }
        }
  
    }
    

}

This is the trigger:

trigger ExampleTrigger on Contact (after insert,after delete) {
    list<contact> contact= Trigger.new;
    if(Trigger.isInsert){
        Integer recordcount= Trigger.new.size();
        EmailManager.sendMail('kavya@system.in','Trailhead Trigger Tutorial',  recordcount+'contact(s) were inserted.');
    }else if(Trigger.isDelete){
        Integer recordcount = Trigger.new.size();
        
    }
public class Cus_Inv_Exmp1 {
    public static void callMe(List<APEX_Customer__c> customers )
    {  
        List<APEX_Invoice__c> InvoiceList=new List<APEX_Invoice__c>();
        for(APEX_Customer__c objCust:customers)
        {   
            if(objCust.APEX_Customer_Status__c=='Active')
            {
                APEX_Invoice__c objInvoice=new APEX_Invoice__c();
                objInvoice.APEX_Status__c='Active';
                objInvoice.APEX_Description__c='Recored created through trigger';
                objInvoice.APEX_Customer__c=objCust.id;
                InvoiceList.add(objInvoice);
                
            }
            
        }
      Insert  InvoiceList;//DML
    }
}


Callout for Trigger :

trigger Cus_Inv_Exmp1 on APEX_Customer__c (after update)
{

     Cus_Inv_Exmp1.callMe(Trigger.new);   
}