• Karunat1
  • NEWBIE
  • 40 Points
  • Member since 2016
  • Salesforce Developer
  • Birlasoft


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 12
    Replies
Hi,
Here is my component. with the help of this component m trying to insert record in my Custom object Mentotr__c. But my records is nnot saving on button click
Component:
<aura:component controller="createMentor" implements="lightning:actionOverride,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >
    <aura:attribute name="newMentor" type="Mentor__c" default="{'sobjectType': 'Mentor__c',
                                                               'Name': '',
                                                               'Email__c': '',
                                                               'Phone__c': '',
                                                               'No_of_Inters__c': '',
                                                               'No_of_Sessions__c': '',
                                                               'No_of_Sessions_Taken__c': '',
                                                               'Session__c': ''}"/>
    <!-- Create attribute to store lookup value as a sObject--> 
    <aura:attribute name="selectedLookUpRecord" type="sObject" default="{}"/>
    
    <ui:button class="slds-align_absolute-center" label="Click Me To Popup!!!" press="{!c.openmodal}"  /> 
    <div role="dialog" tabindex="-1" aria-labelledby="header43" aura:id="Modalbox" class="slds-modal slds-modal_large">
        <div class="slds-modal__container" style="width: 65%;">
            <div class="slds-modal__header">
                CREATE
            </div>
            <div class="slds-modal__content slds-p-around--medium">
                <!--FIRSTSECTION-->
                <div class="slds-p-left_xx-large slds-p-right_xx-large">
                    <div class="slds-page-header" style="padding-top: 9px; padding-bottom: 9px;, padding-right: 9px;, padding-left: 10px;">
                        <h3 style="font-size: 1rem;" title="">Intern Information</h3>
                    </div> 
                </div>    
                <div class="slds-grid slds-p-top_medium">
                    <div class="slds-size_6-of-12 slds-p-left_xx-large slds-p-horizontal_x-large " >
                        <lightning:input label="Name" name="myname"  /> 
                    </div>
                    <div class="slds-size_5-of-12 slds-p-left_xx-small slds-p-horizontal_x-large " >
                        <lightning:input label="Email" name="myname" /> 
                    </div>
                </div>
                <div class="slds-grid slds-p-top_x-small">
                    <div class="slds-size_6-of-12 slds-p-left_xx-large slds-p-horizontal_x-large " >
                        <lightning:input label="Phone" name="myname"  /> 
                    </div>
                    <div class="slds-size_5-of-12 slds-p-left_xx-small slds-p-horizontal_x-large " >
                        <c:customLookupCmp objectAPIName="Intern__c"
                                               IconName="standard:Intern__c" 
                                               selectedRecord="{!v.selectedLookUpRecord}" 
                                               label="Intern Name"/>
                    </div>
                </div>
                <div class="slds-grid slds-p-top_x-small">
                    <div class="slds-size_6-of-12 slds-p-left_xx-large slds-p-horizontal_x-large " >
                        <c:customLookupCmp objectAPIName="Session__c" 
                                               IconName="standard:Session__c" 
                                               selectedRecord="{!v.selectedLookUpRecord}" 
                                               label="Session Name"/> 
                    </div>
                    
                </div>
                
                <!--SECONDSECTION-->
                <div class="slds-p-left_xx-large slds-p-right_xx-large slds-p-top_medium">
                    <div class="slds-page-header" style="padding-top: 9px; padding-bottom: 9px;, padding-right: 9px;, padding-left: 10px;">
                        <h3 style="font-size: 1rem;" title="">Count Records</h3>
                    </div> 
                </div>    
                <div class="slds-grid slds-p-top_medium">
                    <div class="slds-size_6-of-12 slds-p-left_xx-large slds-p-horizontal_x-large " >
                        <lightning:input label="No of Interns" name="myname"  /> 
                    </div>
                    <div class="slds-size_5-of-12 slds-p-left_xx-small slds-p-horizontal_x-large " >
                        <lightning:input label="No of Sessions" name="myname" /> 
                    </div>
                </div>
                <div class="slds-grid slds-p-top_x-small">
                    <div class="slds-size_6-of-12 slds-p-left_xx-large slds-p-horizontal_x-large " >
                        <lightning:input label="No of Sessions Taken" name="myname"  /> 
                    </div>
                    </div>
            </div>
            <div class="slds-modal__footer">
                <ui:button label="Save" press="{!c.saveMentor}"/>
                <ui:button label="Close" press="{!c.closeModal}"/>
            </div>
        </div>
    </div>
    <div class="slds-backdrop " aura:id="Modalbackdrop"></div>   
</aura:component>
JS Controller:
({
	closeModal:function(component,event,helper){    
		var cmpTarget = component.find('Modalbox');
		var cmpBack = component.find('Modalbackdrop');
		$A.util.removeClass(cmpBack,'slds-backdrop--open');
		$A.util.removeClass(cmpTarget, 'slds-fade-in-open'); 
    	},
	openmodal:function(component,event,helper) {
		var cmpTarget = component.find('Modalbox');
		var cmpBack = component.find('Modalbackdrop');
		$A.util.addClass(cmpTarget, 'slds-fade-in-open');
		$A.util.addClass(cmpBack, 'slds-backdrop--open'); 
	},
    saveMentor: function(component, event, helper) {
        var mntr = component.get("v.newMentor");
        var action = component.get("c.CreateMentor");
        action.setParams({ 
            "mntr": mntr
        });
        action.setCallback(this, function(a) {
            var state = a.getState();
            if (state === "SUCCESS") {
               // var name = a.getReturnValue();
                document.getElementById("backGroundSectionId").style.display = "none";
                document.getElementById("newMentorSectionId").style.display = "none";
            }else if (a.getState() === "ERROR") {
                $A.log("Errors", a.getError());
            }
        });
        $A.enqueueAction(action)
    },
})

Apex Class:
public class createMentor {
    @AuraEnabled
    public static void CreateMentor(Mentor__c mntr){
        insert mntr;
    }
}
Thanks
In below screenshot:
User-added image

1) I am not able to see value in above section
table value should be shown in above section like:
In the table, We have 2 Rejected and 1 Accepted. These values should be shown in above. 
2) When I click on either accept or Reject button then status value should be change accordigly
I have created a component for this. How can i do this?
Code:
public class GdriveUsingJWT {
    public static String Sinatute_blob;
    public static blob Signature_b;
    public static blob privateKey;
    public string iss;
    public string scope;
    public string aud;
    public Long exp;
    public Long iat;
    
    public static HttpResponse accessToken(){
        http h = new Http();
        Httprequest req = new HttpRequest();
        HttpResponse res = new HttpResponse();
        req.setEndpoint('https://accounts.google.com/o/oauth2/token');
        req.setMethod('POST');
        req.setHeader('ContentType','application/x-www-form-urlencoded');
        
        String Header = '{"alg":"RS256","typ":"JWT"}';
        String Header_Encode = EncodingUtil.base64Encode(blob.valueof(Header));
        
        String claim_set = '{"iss":"driveint@gd-proj-  211813.iam.gserviceaccount.com"';
        claim_set += ',"scope":"https://www.googleapis.com/auth/analytics.readonly"';
        claim_set += ',"aud":"https://accounts.google.com/o/oauth2/token"';
        claim_set += ',"exp":"'+datetime.now().addHours(1).getTime()/1000;
        claim_set += '","iat":"'+datetime.now().getTime()/1000+'"}';
        system.debug('Response ='+claim_set);        
        String claim_set_Encode = EncodingUtil.base64Encode(blob.valueof(claim_set));
        String Singature_Encode = Header_Encode+'.'+claim_set_Encode;
        String key = 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDFa951gVKwj+ygqY2JwWKqaKm1G/7lqUAW4e51OXh8Tf+5WXgSfhxXQQXnneHTcQQOp4gDNGmg1u7MGqnIOEHh+5wwul+t4wtlHiV/RWjPcOYAIk/D/9C65KGR3ZZ1ko7VPR3DH/pnXr7UlTIhgVhiT1iKlmhltoNTr9Fqc6io8DxvXvjdms8+YSBJ3doMsPD1YMfcExhbEJxPfXdH1IMALKfEFlUGRyLE38cLJS0bXwoCPCUFLpzVEoOOB3g+yMBBYaXRRjWEuSm+6Vo1N5Mjf2bZyOFOHc62gpenGF99nyKez/aQrvt9ZZA7qTvYio1X+LzWc3aZmA/4/5TmxwQXAgMBAAECggEAVlqdJ4PmYhHKXOpdXVzIJib62JwCzn1OadPwpLj7QVAy4+XFNj2QcwAfr5TpUz4Tmr9gKJqz+2UYdhHRoyEsfEc9JjlXoa127geWOknnkxlcmcFoZ6DNsfpQzAeDiTEOpiqCCrhBpRaV3VHXaD12JiZz4cbxqk//uMrmjKxDoYUS5xagn7DT36zlSxHkWGaLzpdm4/dxg29XPsEipJsJ+APv+coS4wLw9aS3Y1Qf6OzE1nZwHQfPCxzI/fwy51TEYhFSrRDQX0lwNuKBlDCWEu5+AOW3Q8URj3kOG4BYjog7tMC+1cM7rWcwBA+iItQH1J4YL0DPHHTfYkVERmDBeQKBgQDqxV1vnWviV8l1yzHgE0fWGFICO9UfQbzwH8wkbejtBCMXuNL9lTzqZrSkY4srIZvpPjLPLMP0UJsZ/x0yGncwrTCeC6w7ptz2h710vNSKyCxpzhNW9p7+u2dM5gQAuoduupgJj7UlrnL95eHZG38UqmK0JXe0YnI0oYdnuHSdfwKBgQDXRekfkR+VJI/OwIfuHLsWaj06O/u3CKV47z5ulij8QhQS3b2QeDeJhD7jjYr8HxNoreVVC+DKuJymk5RaLTvk4eapRu4QbHOipjDYFP7q1me9EfZ9KSqh8wl9H/7aJNvXQ7OVKTcVhlYr+5znDw8eNWBNXLQ0ueDimu1uQ3kVaQKBgQDTRl45re+CuAHi8cOmpXNGZoiW3gWDpYNEjTkHp6mwcsKp/HhUINO7FkaGkdaSMCLBGmpbKywFV+zczksV5d9RfOp9sH+FBzte2PVUcwLLCi194ihhYHvhPgFOoMkFZteufFmKcTtR99YgS5qd6TLKBDPjbrx1Jwsj9iGG4+Z+PQKBgHtfRo5fxmDcFkqgToapEpNzCWnxbH3mR6b6PaZ1CkIfwI9bY0ODkhiOoNgai1eYm6/3USIfb5HeoXBZzcCsgdHXoTDMRK1G6jKB2iZMShfeDo/t1ny+df9gYMTD7HOqgg9pbmcCut3sIkCMr8w/9iMS5gEQKvq4uGhF7+Ksap1ZAoGAfDBxuVrafCwoLZdZdgSX9oAbN0w7tJrIq4a/VCBVrJLAh6sX5bbEvR32Pc06iT0FrHQtJox3i1k1KU8LW213i1NWG926DVHQV5laMdVVS03dh8TZIyeLcuJDcHI8J+cVSKOuWdVvLn5NE7Y7BAPJgT8lbGTM0UPVi2GE+If0Z/I';
        privateKey = EncodingUtil.base64Decode(key);
        system.debug('Singature_Input ='+privateKey);
        Singature_Encode = Singature_Encode.replaceAll('=','');
        String Singature_Encode_Url = EncodingUtil.urlEncode(Singature_Encode,'UTF-8');
        Signature_b =   blob.valueof(Singature_Encode_Url);
        Sinatute_blob = base64(Crypto.sign('RSA-SHA256', Signature_b , privateKey));
        system.debug('Singature_blobinatute_blob'+Sinatute_blob);
        String JWT = Singature_Encode+'.'+Sinatute_blob;
        system.debug('JWT@@'+JWT);
        JWT = JWT.replaceAll('=','');
        
        String grt = 'urn:ietf:params:oauth:grant-type:jwt-bearer';
        req.setBody('grant_type='+grt+'&assertion='+JWT);
        res = h.send(req);
        if (res.getStatusCode() == 200) {
            String Response = res.getBody();
            system.debug('@@@response'+ Response);
            Integer stuscode = res.getStatusCode();
            system.debug('@@@statuccode'+ stuscode);
            Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(res.getBody());
            system.debug('result='+ results );
            List<Object> values = (List<Object>) results.get('values');
            System.debug('@@@values are:'+ values);
            //system.debug('result='+ results );
            //Map<String, String> accessMap= new Map<String, String>();
         }
        return res;
    }
    private static String base64(Blob b) {
        String ret = EncodingUtil.base64Encode(b);
        system.debug('@@@##blob@@'+ b);
        system.debug('@@@rett'+ret);
        ret = ret.replaceAll('\\+', '-');
        ret = ret.replaceAll('/', '_');
        ret = ret.replaceAll('=', '');
        system.debug('@@@rett'+ret);
        return ret;
    }
}
I want to create Folder in Google Drive







 
How to show/Hide div using "Document.getElementsByClassName()" in Lightning? 
Before adding namespace in my org application was working fine but when I added namespace , app is not working.
Requirement is : I want to show opportunity Name, Account Name and Contact but not getting any record  in Lightning Application. 
I don't what happend.
<script>
    $Lightning.use("sgcpq:ProApp",function(){
        $Lightning.createComponent("sgcpq:ProductApplication",{
            'OpportunityId':'{!Opportunity.Id}',
            'AccountId':'{!Opportunity.AccountId}',
            'OpportunityName':'{!Opportunity.Name}',
            'AccountName':'{!Opportunity.Account.Name}'
        },
        "lightning",
            function(cmp) {
               //cmp.set("v.recordId",'{!$CurrentPage.parameters.id}');
          }
       );
    });
    
    </script>
How to resolve:
An internal server error has occurred Error ID: 1731230484-118278 (-620132692)
I have a table of contacts along with checkboxes and have also Delete button on vf page.

Scenario:
When I click on delete button then pop should be open with message "You have to select checkbox"..

 
I want to delete records from PageBlockTable via Remote Action?
When I mark a resume__c as Active(picklist value).
All the applications for this candidate should be updated with the current resume(Current is picklist  value on Application__c)
(Exsiting records should also be updated if above scenario will be match)
Parent--- Resume
Child--- Application
Resume__c and Application__c are Child of Candidate__c
 
"myfirstcontapp" is a Namespace Prefix

Code for AnimalLocator Class:
public class AnimalLocator{
   public static String getAnimalNameById(Integer id){
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals/'+id);
        request.setMethod('GET');
        HttpResponse response = http.send(request);
        String strResp = '';
        system.debug('******response '+response.getStatusCode());
        system.debug('******response '+response.getBody());
        // If the request is successful, parse the JSON response.
        if (response.getStatusCode() == 200){
            // Deserializes the JSON string into collections of primitive data types.
            Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());
            // Cast the values in the 'animals' key as a list
            Map<string,object> animals = (map<string,object>) results.get('animal');
            System.debug('Received the following animals:' + animals );
            strResp = string.valueof(animals.get('name'));
            System.debug('strResp >>>>>>' + strResp );
        }
        return strResp ;
    }
}


Code for AnimalLocatorMock Mock Class
@isTest
global class AnimalLocatorMock implements HttpCalloutMock {
    // Implement this interface method
    global HTTPResponse respond(HTTPRequest request) {
        // Create a fake response
        HttpResponse response = new HttpResponse();
        response.setHeader('Content-Type', 'application/json');
        response.setBody('{"animal":{"id":1,"name":"chicken","eats":"chicken food","says":"cluck cluck"}}');
        response.setStatusCode(200);
        return response; 
    }
}
Code for AnimalLocatorTest​  Test Class:
@isTest
public class AnimalLocatorTest {
  @isTest public static void AnimalLocatorMock() {
       //Test.setMock(HttpCalloutMock.class, new AnimalLocatorMock());
      test.setMock(HttpCalloutMock.class, new AnimalLocatorMock());
        string result = AnimalLocator.getAnimalNameById(1);
      system.debug(result);
        String expectedResult = 'chicken';
        System.assertEquals(result,expectedResult );
    }
}
Thanks
Hi,
Here is my component. with the help of this component m trying to insert record in my Custom object Mentotr__c. But my records is nnot saving on button click
Component:
<aura:component controller="createMentor" implements="lightning:actionOverride,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >
    <aura:attribute name="newMentor" type="Mentor__c" default="{'sobjectType': 'Mentor__c',
                                                               'Name': '',
                                                               'Email__c': '',
                                                               'Phone__c': '',
                                                               'No_of_Inters__c': '',
                                                               'No_of_Sessions__c': '',
                                                               'No_of_Sessions_Taken__c': '',
                                                               'Session__c': ''}"/>
    <!-- Create attribute to store lookup value as a sObject--> 
    <aura:attribute name="selectedLookUpRecord" type="sObject" default="{}"/>
    
    <ui:button class="slds-align_absolute-center" label="Click Me To Popup!!!" press="{!c.openmodal}"  /> 
    <div role="dialog" tabindex="-1" aria-labelledby="header43" aura:id="Modalbox" class="slds-modal slds-modal_large">
        <div class="slds-modal__container" style="width: 65%;">
            <div class="slds-modal__header">
                CREATE
            </div>
            <div class="slds-modal__content slds-p-around--medium">
                <!--FIRSTSECTION-->
                <div class="slds-p-left_xx-large slds-p-right_xx-large">
                    <div class="slds-page-header" style="padding-top: 9px; padding-bottom: 9px;, padding-right: 9px;, padding-left: 10px;">
                        <h3 style="font-size: 1rem;" title="">Intern Information</h3>
                    </div> 
                </div>    
                <div class="slds-grid slds-p-top_medium">
                    <div class="slds-size_6-of-12 slds-p-left_xx-large slds-p-horizontal_x-large " >
                        <lightning:input label="Name" name="myname"  /> 
                    </div>
                    <div class="slds-size_5-of-12 slds-p-left_xx-small slds-p-horizontal_x-large " >
                        <lightning:input label="Email" name="myname" /> 
                    </div>
                </div>
                <div class="slds-grid slds-p-top_x-small">
                    <div class="slds-size_6-of-12 slds-p-left_xx-large slds-p-horizontal_x-large " >
                        <lightning:input label="Phone" name="myname"  /> 
                    </div>
                    <div class="slds-size_5-of-12 slds-p-left_xx-small slds-p-horizontal_x-large " >
                        <c:customLookupCmp objectAPIName="Intern__c"
                                               IconName="standard:Intern__c" 
                                               selectedRecord="{!v.selectedLookUpRecord}" 
                                               label="Intern Name"/>
                    </div>
                </div>
                <div class="slds-grid slds-p-top_x-small">
                    <div class="slds-size_6-of-12 slds-p-left_xx-large slds-p-horizontal_x-large " >
                        <c:customLookupCmp objectAPIName="Session__c" 
                                               IconName="standard:Session__c" 
                                               selectedRecord="{!v.selectedLookUpRecord}" 
                                               label="Session Name"/> 
                    </div>
                    
                </div>
                
                <!--SECONDSECTION-->
                <div class="slds-p-left_xx-large slds-p-right_xx-large slds-p-top_medium">
                    <div class="slds-page-header" style="padding-top: 9px; padding-bottom: 9px;, padding-right: 9px;, padding-left: 10px;">
                        <h3 style="font-size: 1rem;" title="">Count Records</h3>
                    </div> 
                </div>    
                <div class="slds-grid slds-p-top_medium">
                    <div class="slds-size_6-of-12 slds-p-left_xx-large slds-p-horizontal_x-large " >
                        <lightning:input label="No of Interns" name="myname"  /> 
                    </div>
                    <div class="slds-size_5-of-12 slds-p-left_xx-small slds-p-horizontal_x-large " >
                        <lightning:input label="No of Sessions" name="myname" /> 
                    </div>
                </div>
                <div class="slds-grid slds-p-top_x-small">
                    <div class="slds-size_6-of-12 slds-p-left_xx-large slds-p-horizontal_x-large " >
                        <lightning:input label="No of Sessions Taken" name="myname"  /> 
                    </div>
                    </div>
            </div>
            <div class="slds-modal__footer">
                <ui:button label="Save" press="{!c.saveMentor}"/>
                <ui:button label="Close" press="{!c.closeModal}"/>
            </div>
        </div>
    </div>
    <div class="slds-backdrop " aura:id="Modalbackdrop"></div>   
</aura:component>
JS Controller:
({
	closeModal:function(component,event,helper){    
		var cmpTarget = component.find('Modalbox');
		var cmpBack = component.find('Modalbackdrop');
		$A.util.removeClass(cmpBack,'slds-backdrop--open');
		$A.util.removeClass(cmpTarget, 'slds-fade-in-open'); 
    	},
	openmodal:function(component,event,helper) {
		var cmpTarget = component.find('Modalbox');
		var cmpBack = component.find('Modalbackdrop');
		$A.util.addClass(cmpTarget, 'slds-fade-in-open');
		$A.util.addClass(cmpBack, 'slds-backdrop--open'); 
	},
    saveMentor: function(component, event, helper) {
        var mntr = component.get("v.newMentor");
        var action = component.get("c.CreateMentor");
        action.setParams({ 
            "mntr": mntr
        });
        action.setCallback(this, function(a) {
            var state = a.getState();
            if (state === "SUCCESS") {
               // var name = a.getReturnValue();
                document.getElementById("backGroundSectionId").style.display = "none";
                document.getElementById("newMentorSectionId").style.display = "none";
            }else if (a.getState() === "ERROR") {
                $A.log("Errors", a.getError());
            }
        });
        $A.enqueueAction(action)
    },
})

Apex Class:
public class createMentor {
    @AuraEnabled
    public static void CreateMentor(Mentor__c mntr){
        insert mntr;
    }
}
Thanks
In below screenshot:
User-added image

1) I am not able to see value in above section
table value should be shown in above section like:
In the table, We have 2 Rejected and 1 Accepted. These values should be shown in above. 
2) When I click on either accept or Reject button then status value should be change accordigly
I have created a component for this. How can i do this?
How to show/Hide div using "Document.getElementsByClassName()" in Lightning? 
How to resolve:
An internal server error has occurred Error ID: 1731230484-118278 (-620132692)
I have a table of contacts along with checkboxes and have also Delete button on vf page.

Scenario:
When I click on delete button then pop should be open with message "You have to select checkbox"..

 
I want to delete records from PageBlockTable via Remote Action?
When I mark a resume__c as Active(picklist value).
All the applications for this candidate should be updated with the current resume(Current is picklist  value on Application__c)
(Exsiting records should also be updated if above scenario will be match)
Parent--- Resume
Child--- Application
Resume__c and Application__c are Child of Candidate__c
 
"myfirstcontapp" is a Namespace Prefix

Code for AnimalLocator Class:
public class AnimalLocator{
   public static String getAnimalNameById(Integer id){
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals/'+id);
        request.setMethod('GET');
        HttpResponse response = http.send(request);
        String strResp = '';
        system.debug('******response '+response.getStatusCode());
        system.debug('******response '+response.getBody());
        // If the request is successful, parse the JSON response.
        if (response.getStatusCode() == 200){
            // Deserializes the JSON string into collections of primitive data types.
            Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());
            // Cast the values in the 'animals' key as a list
            Map<string,object> animals = (map<string,object>) results.get('animal');
            System.debug('Received the following animals:' + animals );
            strResp = string.valueof(animals.get('name'));
            System.debug('strResp >>>>>>' + strResp );
        }
        return strResp ;
    }
}


Code for AnimalLocatorMock Mock Class
@isTest
global class AnimalLocatorMock implements HttpCalloutMock {
    // Implement this interface method
    global HTTPResponse respond(HTTPRequest request) {
        // Create a fake response
        HttpResponse response = new HttpResponse();
        response.setHeader('Content-Type', 'application/json');
        response.setBody('{"animal":{"id":1,"name":"chicken","eats":"chicken food","says":"cluck cluck"}}');
        response.setStatusCode(200);
        return response; 
    }
}
Code for AnimalLocatorTest​  Test Class:
@isTest
public class AnimalLocatorTest {
  @isTest public static void AnimalLocatorMock() {
       //Test.setMock(HttpCalloutMock.class, new AnimalLocatorMock());
      test.setMock(HttpCalloutMock.class, new AnimalLocatorMock());
        string result = AnimalLocator.getAnimalNameById(1);
      system.debug(result);
        String expectedResult = 'chicken';
        System.assertEquals(result,expectedResult );
    }
}
Thanks
Hello,
I am getting error that says Central and Eastern Target Accounts' report does not appear to have a filter where Prospect Rating equals 'Hot, Warm'. The filter does not give me option for Field: Prospect Rating?
User-added image