• Sai Laasya
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 5
    Replies
Hi

Could anyone please help me out.

I have a map in my apex controller. The key value pair is showing correct values in my debug logs. 
And when I am using Map.get(key) method it is returning null though the key,value pair exists in the map.
This is happening only for a particular user. For other users, the map is working fine.

User1 Debug Logs:
10:46:37.0 (25625411)|USER_DEBUG|[473]|DEBUG|DP Map####{2017-03-01 00:00:00=a06p0000003QE3YAAW, 2017-03-02 00:00:00=a06p0000003QE3ZAAW, 2017-03-03 00:00:00=a06p0000003QE3aAAG, 2017-03-04 00:00:00=a06p0000003QE3bAAG, 2017-03-05 00:00:00=a06p0000003QE3cAAG, 2017-03-06 00:00:00=a06p0000003QE3dAAG, 2017-03-07 00:00:00=a06p0000003QE3eAAG, 2017-03-08 00:00:00=a06p0000003QE3fAAG, 2017-03-09 00:00:00=a06p0000003QE3gAAG, 2017-03-10 00:00:00=a06p0000003QE3hAAG, ...} 

10:46:32.0 (43377517)|USER_DEBUG|[555]|DEBUG|Day Value ####2017-03-02 00:00:00 10:46:32.0 (43382829)|STATEMENT_EXECUTE|[556] 10:46:32.0 (43385696)|HEAP_ALLOCATE|[556]|Bytes:14 10:46:32.0 (43428743)|HEAP_ALLOCATE|[556]|Bytes:18 10:46:32.0 (43440260)|HEAP_ALLOCATE|[556]|Bytes:32 10:46:32.0 (43448708)|USER_DEBUG|[556]|DEBUG|Map Value ####a06p0000003QE3ZAAW


User 2 Debug Logs:

10:49:53.0 (25411489)|USER_DEBUG|[473]|DEBUG|DP Map####{2017-03-01 00:00:00=a06p0000003QGRWAA4, 2017-03-02 00:00:00=a06p0000003QGRXAA4, 2017-03-03 00:00:00=a06p0000003QGRYAA4, 2017-03-04 00:00:00=a06p0000003QGRZAA4, 2017-03-05 00:00:00=a06p0000003QGRaAAO, 2017-03-06 00:00:00=a06p0000003QGRbAAO, 2017-03-07 00:00:00=a06p0000003QGRcAAO, 2017-03-08 00:00:00=a06p0000003QGRdAAO, 2017-03-09 00:00:00=a06p0000003QGReAAO, 2017-03-10 00:00:00=a06p0000003QGRfAAO, ...} 

10:49:53.0 (34085451)|USER_DEBUG|[555]|DEBUG|Day Value ####2017-01-03 00:00:00 10:49:53.0 (34089903)|STATEMENT_EXECUTE|[556] 10:49:53.0 (34092924)|HEAP_ALLOCATE|[556]|Bytes:14 10:49:53.0 (34130947)|HEAP_ALLOCATE|[556]|Bytes:18 10:49:53.0 (34140284)|USER_DEBUG|[556]|DEBUG|Map Value ####null


Both the users are System Admins
 
I have a detail page button on my Opportunity page. I want to use onclick Javascript to capture two date fields called Start Date and End Date. I am able to input the dates using prompt in javascript. Is it possible to insert those dates into the same opportunity record?
Hi,

I am using a vf page for downloading a list of records on button click as an excel sheet. To enable more than 1000 records, I have added readOnly="true" for the vf page. But the attribute doesn't seem to work. Is there anything else I have to do to overcome "Collection too large" error. Please help.
Is there a way to view the latest updated records in a list view in salesforce?
My scenario is - I am performing a data update from a data loader. I have huge chunks of data. I will have to upload the data sample by sample to ensure data integrity. If I perform an update at 3:00 pm and another at 3:05 pm, is there a way to view how many updates were done at both the times separately? Please help
Hi all

I am working on case management. As we all know, we can select a solution for each case by clicking on Find Solution button in the Solutions related list. I want to know if there is a way to place the solution attachment in case attachments related list.
I have a scenario, where I need to insert data into Lead object using Data Loader by checking for the duplicates based on the Email field. Inserting data and preventing duplicate fields has been done with import wizard.

But here, while importing data into Lead we also need to save all the rejected/duplicate records into a Custom Object. I have created a before Insert trigger to prevent duplicates and to save the records into Custom Object. But, custom Object records are not populated.
Any suggestions, where  I am going wrong.

trigger findduplicates on Lead (before insert) {
Map<String, Lead> leadMap = new Map<String, Lead>();
  List<Duplicate_Lead__c> dups = new List<Duplicate_Lead__c>();
    for (Lead lead : System.Trigger.new) {
       
        // Make sure we don't treat an email address that 
        // isn't changing during an update as a duplicate. 
   
        if ((lead.Email != null) &&
                (System.Trigger.isInsert ||
                (lead.Email !=
                    System.Trigger.oldMap.get(lead.Id).Email))) {
       
            // Make sure another new lead isn't also a duplicate 
   
            if (leadMap.containsKey(lead.Email)) {
              lead.Email.addError('Another new lead has the same email address.');
                  system.debug('Another new lead has the same email address.');
                 
       Duplicate_Lead__c dup= new Duplicate_Lead__c ();
       dup.First_Name__c = lead.FirstName;
       dup.Last_Name__c = lead.LastName;
       dup.Email__c = lead.Email;      
      
       dups.add(dup);                
 
                                                    
      }else{
                leadMap.put(lead.Email, lead);
            }
       }
     
    }
     insert dups;
}

Thanks in Advance
I am new to development. And currently working on force.com sites. Currently, my site domain is mycompany.force.com/home_page. But I want to change the domain to mycompany.com/home_page. Is there a way to do this? Please let me know
Can anyone please let me know how to access fields of email object
Hi

Could anyone please help me out.

I have a map in my apex controller. The key value pair is showing correct values in my debug logs. 
And when I am using Map.get(key) method it is returning null though the key,value pair exists in the map.
This is happening only for a particular user. For other users, the map is working fine.

User1 Debug Logs:
10:46:37.0 (25625411)|USER_DEBUG|[473]|DEBUG|DP Map####{2017-03-01 00:00:00=a06p0000003QE3YAAW, 2017-03-02 00:00:00=a06p0000003QE3ZAAW, 2017-03-03 00:00:00=a06p0000003QE3aAAG, 2017-03-04 00:00:00=a06p0000003QE3bAAG, 2017-03-05 00:00:00=a06p0000003QE3cAAG, 2017-03-06 00:00:00=a06p0000003QE3dAAG, 2017-03-07 00:00:00=a06p0000003QE3eAAG, 2017-03-08 00:00:00=a06p0000003QE3fAAG, 2017-03-09 00:00:00=a06p0000003QE3gAAG, 2017-03-10 00:00:00=a06p0000003QE3hAAG, ...} 

10:46:32.0 (43377517)|USER_DEBUG|[555]|DEBUG|Day Value ####2017-03-02 00:00:00 10:46:32.0 (43382829)|STATEMENT_EXECUTE|[556] 10:46:32.0 (43385696)|HEAP_ALLOCATE|[556]|Bytes:14 10:46:32.0 (43428743)|HEAP_ALLOCATE|[556]|Bytes:18 10:46:32.0 (43440260)|HEAP_ALLOCATE|[556]|Bytes:32 10:46:32.0 (43448708)|USER_DEBUG|[556]|DEBUG|Map Value ####a06p0000003QE3ZAAW


User 2 Debug Logs:

10:49:53.0 (25411489)|USER_DEBUG|[473]|DEBUG|DP Map####{2017-03-01 00:00:00=a06p0000003QGRWAA4, 2017-03-02 00:00:00=a06p0000003QGRXAA4, 2017-03-03 00:00:00=a06p0000003QGRYAA4, 2017-03-04 00:00:00=a06p0000003QGRZAA4, 2017-03-05 00:00:00=a06p0000003QGRaAAO, 2017-03-06 00:00:00=a06p0000003QGRbAAO, 2017-03-07 00:00:00=a06p0000003QGRcAAO, 2017-03-08 00:00:00=a06p0000003QGRdAAO, 2017-03-09 00:00:00=a06p0000003QGReAAO, 2017-03-10 00:00:00=a06p0000003QGRfAAO, ...} 

10:49:53.0 (34085451)|USER_DEBUG|[555]|DEBUG|Day Value ####2017-01-03 00:00:00 10:49:53.0 (34089903)|STATEMENT_EXECUTE|[556] 10:49:53.0 (34092924)|HEAP_ALLOCATE|[556]|Bytes:14 10:49:53.0 (34130947)|HEAP_ALLOCATE|[556]|Bytes:18 10:49:53.0 (34140284)|USER_DEBUG|[556]|DEBUG|Map Value ####null


Both the users are System Admins
 
Hi,

I am using a vf page for downloading a list of records on button click as an excel sheet. To enable more than 1000 records, I have added readOnly="true" for the vf page. But the attribute doesn't seem to work. Is there anything else I have to do to overcome "Collection too large" error. Please help.
I have a scenario, where I need to insert data into Lead object using Data Loader by checking for the duplicates based on the Email field. Inserting data and preventing duplicate fields has been done with import wizard.

But here, while importing data into Lead we also need to save all the rejected/duplicate records into a Custom Object. I have created a before Insert trigger to prevent duplicates and to save the records into Custom Object. But, custom Object records are not populated.
Any suggestions, where  I am going wrong.

trigger findduplicates on Lead (before insert) {
Map<String, Lead> leadMap = new Map<String, Lead>();
  List<Duplicate_Lead__c> dups = new List<Duplicate_Lead__c>();
    for (Lead lead : System.Trigger.new) {
       
        // Make sure we don't treat an email address that 
        // isn't changing during an update as a duplicate. 
   
        if ((lead.Email != null) &&
                (System.Trigger.isInsert ||
                (lead.Email !=
                    System.Trigger.oldMap.get(lead.Id).Email))) {
       
            // Make sure another new lead isn't also a duplicate 
   
            if (leadMap.containsKey(lead.Email)) {
              lead.Email.addError('Another new lead has the same email address.');
                  system.debug('Another new lead has the same email address.');
                 
       Duplicate_Lead__c dup= new Duplicate_Lead__c ();
       dup.First_Name__c = lead.FirstName;
       dup.Last_Name__c = lead.LastName;
       dup.Email__c = lead.Email;      
      
       dups.add(dup);                
 
                                                    
      }else{
                leadMap.put(lead.Email, lead);
            }
       }
     
    }
     insert dups;
}

Thanks in Advance
Can anyone please let me know how to access fields of email object