• Sanket Vidhate
  • NEWBIE
  • 25 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
I'm trying to write a test class and load bunch of test lead's data but for some reason when I call the static resource (that has my CSV) is not recognizing the custom fields. Example, Lead_insurance_Id__c

My CSV file - static resource:
// Example of how my CSV looks like

Id, Firstname, Lastname, Leads_Insurance_ID__c,..etc

000012, Fares, Alsyoufi, 12184111, ..etc
000011, Fare,syoufi, 12184211, ..etc
000013, Fares, syouf, 12184311, ..etc

My test class:
 
@isTest 
global class DataUtil {
    static testmethod void testLoadData() {
        // Load the test accounts from the static resource
        List<sObject> ls = Test.loadData(Account.sObjectType, 'TestData');
        
       }
}

Error message: 

User-added image

Seems like the standard Salesforce fields didn't cause any execptions but custom fields did (I tried other one beside Lead_Insurance_Id__c) and I still got the same error message. 

P.S:
I've tried to change my CSV header to all of these formats but non helped:

LEADS_INSURANCE_ID__c
Leads_insurance_Id__c
Lead.DLeads_insurance_Id__c
Insurance ID (Field's label)
I'm using $A.get('e.force:editRecord') to display standard lightning edit modal window. I want to refresh my component after user saves the given record. However there are no callback events documented by salesforce on record save success for e.force:editRecord.

By using chrome lighting inspector tool I found two events getting fired when I clicked on Save button.
1. force:recordChange (Application Event)
2. force:save (Component Event)

I declared an application event handler for force:recordChange
<aura:handler event="force:recordChange" action="{!c.handleRecordChange}"/>

Got following error
[ERROR]: No EVENT named recordChange found: Source

To handle component event force:save I have to specify event name
<aura:handler name="?" event="force:save" action="{!c.handleRecordSave}"/>

How do I notify custom component when user saves the record.
Hi,
Can any one help me with an example of a standard object that’s also junction object in salesforce.

Thanks in Advance
How can I delete all the records of a custom object in Developer Edition?