• Shivangi Verma
  • NEWBIE
  • 15 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 8
    Replies
Hi All,
When trying to execute the code for Summer19 PD1 maintenance, i am getting the following error : 

When executed, the BatchLeadConvertTest test class has test failures. All tests should pass.

I did not make any changes to the test class. It came with the package as is. Can anyone please help.
Hi All,
We are facing an issue where we have stopped receiving emails from salesforce altogether. We are using mimecast for email security filters and as per them they are not receiving any requests from salesforce so there is no error in the logs. Even the 'Test Deliverability' is not working. We have checked the IP whitelist and salesforce IPs are listed under that. Has anyone faced this issue or if you have any inputs please put it in the comments.
#Salesforceemails #Mimecast #Email 
 
Thanks
Shivangi
Hi All,
I have created a component which open on a button click. The component is basically quering on the lookup field using LDS, but i am getting the following error. I have added the field on the record data as well.
I have a lightning component with two buttons :  Won and Lost set to change the value on Opp object. If the reason field is empty  and you Press Lost button it flashes a validation message. If the reason field has value then it changes the state to Lost but clears the value of the field after saverecord. I am using LDS to save the record. Please let me know if what could be the issue here.
Hi All,
I have a requirement to create a lightning component in which i want to display the images as links. On clicking the image an action should be called from the Js controller. Please let me know how to do this in lightning.
Getting  Error:
Executing the 'AccountManager' method failed. Either the service isn't configured with the correct urlMapping, is not global, does not have the proper method name or does not return the requested account and all of its contacts.

@RestResource(urlMapping='/Accounts/*/contacts')
global class AccountManager {
    @HttpGet
    global static Account getAccount() {
        RestRequest req = RestContext.request;
        String accId = req.requestURI.substringBetween('Accounts/','/contacts');
        Account acc = [SELECT Id, Name, (SELECT Id, Name FROM Contacts) 
                       FROM Account WHERE Id = :accId];
        return acc;
    }
}

Test class

@isTest 
private class AccountManagerTest{
    static testMethod void testMethod1(){
        Account objAccount = new Account(Name = 'test Account');
        insert objAccount;
        Contact objContact = new Contact(LastName = 'test Contact',
                                         AccountId = objAccount.Id);
        insert objContact;
        Id recordId = objAccount.Id;
        RestRequest request = new RestRequest();
        request.requestUri =
            'https://mindful-otter-12kfkn-dev-ed.lightning.force.com/services/apexrest/Accounts/'
            + recordId +'/contacts';
        request.httpMethod = 'GET';
        RestContext.request = request;
        // Call the method to test
        Account thisAccount = AccountManager.getAccount();
        // Verify results
        System.assert(thisAccount!= null);
        System.assertEquals('test Account', thisAccount.Name);
    }
}
Platform Developer I Certification Maintenance (Summer '19)  Challenege code
********************************************************************************
Modify an existing batch Apex job to raise BatchApexErrorEvents

Take an existing batch Apex job class and update it to implement the Database.RaisesPlatformEvents interface. Then, add a trigger on BatchApexErrorEvent that logs exceptions in the batch job to a custom object.
Update the BatchLeadConvert class to implement the Database.RaisesPlatformEvents marker interface.

Create an Apex trigger called BatchApexErrorTrigger on the BatchApexErrorEvent SObject type. For each event record, capture the following fields and save them to the corresponding fields in a new BatchLeadConvertErrors__c record.
AsyncApexJobId: AsyncApexJobId__c
JobScope: Records__c
StackTrace: StackTrace__c
To make the trigger bulk safe, use a single DML statement to insert a list of new records at the end.
****************************************************************



trigger BatchApexErrorTrigger on BatchApexErrorEvent (after insert) {
    
   list<BatchLeadConvertErrors__c> bcr= new List<BatchLeadConvertErrors__c>();
    
    for(BatchApexErrorEvent event: trigger.new){
        
        BatchLeadConvertErrors__c  evrterror= new BatchLeadConvertErrors__c ();
        
        evrterror.AsyncApexJobId__c= event.AsyncApexJobId;
        evrterror.Records__c=event.JobScope;
        evrterror.StackTrace__c=event.StackTrace;     
        bcr.add(evrterror);    
    }
    
    if(bcr.size()>0){
        
        insert bcr;
    }

}

*************************************************************
BatchLeadConvert Apex Batch Class

public with sharing class BatchLeadConvert implements Database.Batchable<SObject>, Database.RaisesPlatformEvents{

// Not be bothered whats here. Just Implement Raises Platform Events Interface.
}

 
Hi All,

I was moving all attachments to files using Magic Mover for Lightning Experience app of Salesforce Lab. The apex job in the background is getting failed again and agin for Accounts object and works fine for rest of the objects.
Does anyone knows any specific reason behind this ?
Hi All,
I have a requirement to create a lightning component in which i want to display the images as links. On clicking the image an action should be called from the Js controller. Please let me know how to do this in lightning.
Error ID: 1366790044-8095 (1564800859)
quickActionHandlerHelper.js failed to create component - forceChatter:lightningComponent
may i know why is this error popping up ??