• jha pk
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 12
    Replies
I have one custom object name "dedupe account" which is  in look up with standard custom object  Account . There are country custom picklist  field in Account object . I want to display all accounts w.r.to Country and also display only those account who is not associated to dedupe account. How can i do this using lightning  
I have one custom object dedupe account which is  in look up with standard custom object  Account . There are country custom picklist  field in Account object . I want to display all accounts w.r.to Country and also display only those account who is not associated to dedupe account. How can i do this using lightning . 
Hi Guys,
I am working on salesforce to facebook integration using REST API . We need to pull all the data from the facebook . I don't want to use already install package.

So can you please share your code so that i ll refer it
  • February 01, 2017
  • Like
  • 0
Please help me to write the test class for below class

batch test class- very very urgent
Please help me to write the test class for below batch class

global class UpdatesObjectFields implements Database.Batchable<sObject> {
    
    global Database.QueryLocator start(Database.BatchableContext bc)
    {
        String query= 'SELECT Id,FirstName, LastName, OtherStreet from Contact';


 return Database.getQueryLocator(query); 
    }
    
    global void execute(Database.BatchableContext bc, List<Contact> cnct)
    {
        
        Contact[] con = new List<Contact>();
        List<Contact> my_list = new List<Contact>();  
        List<Contact> my_list1 = new List<Contact>();
        my_list = cnct; 
     my_list1 =  my_list;
        Contact ct = new Contact(); 
        for (integer i=0; i<cnct.size();i++ )
        {
            ct = my_list[i];
            integer j=0;
            if(i+1 >=my_list.size())    
            {
                ct.FirstName = my_list1[j].FirstName;j++;         
            }
           else
            {
                ct.FirstName = my_list[i+1].FirstName;
            }
            if(i+2 >=my_list.size())    
            {
                ct.LastName = my_list1[j].LastName;j++;
            }
            else
            {
                ct.LastName = my_list[i+2].LastName;
            }
            if(i+3 >=my_list.size())    
            {
                ct.OtherStreet = my_list1[j].OtherStreet;j++;
            }
            else
            {
                ct.OtherStreet = my_list[i+3].OtherStreet;
            }  
  • December 13, 2016
  • Like
  • 0
global class UpdatesObjectFields implements Database.Batchable<sObject> {
    
    global Database.QueryLocator start(Database.BatchableContext bc)
    {
        String query= 'SELECT FirstName, LastName  from Contact';


 return Database.getQueryLocator(query); 
    }
    
    global void execute(Database.BatchableContext bc, List<Contact> cnct)
    {
        
        Contact[] con = new List<Contact>();
        List<Contact> my_list = new List<Contact>();  
        List<Contact> my_list1 = new List<Contact>();
        my_list = cnct; 
     my_list1 =  my_list;
        Contact ct = new Contact(); 
        for (integer i=0; i<cnct.size();i++ )
        {
            ct = my_list[i];
            integer j=0;
            if(i+1 >=my_list.size())    
            {
                ct.FirstName = my_list1[j].FirstName;j++;         
            }
           else
            {
                ct.FirstName = my_list[i+1].FirstName;
            }
            if(i+2 >=my_list.size())    
            {
                ct.LastName = my_list1[j].LastName;j++;
            }
            else
            {
                ct.LastName = my_list[i+2].LastName;
            }
            
            
            
            con.add(ct);
        }    
        update con;
        
        
    }
    
    global void finish(Database.BatchableContext bc)
    { 
    }
}
  • December 13, 2016
  • Like
  • 0
global class UpdatesObjectFields implements Database.Batchable<sObject> {
    
    global Database.QueryLocator start(Database.BatchableContext bc)
    {
        String query= 'SELECT Id,FirstName, LastName, OtherStreet,OtherCity,OtherState,OtherPostalCode,OtherCountry,OtherStateCode,OtherCountryCode,OtherLatitude,OtherLongitude,OtherGeocodeAccuracy,OtherAddress,MailingStreet,MailingCity,MailingState,MailingPostalCode,MailingCountry,MailingStateCode,MailingCountryCode,MailingLatitude,MailingLongitude,MailingGeocodeAccuracy,MailingAddress,Phone,Fax,MobilePhone,HomePhone,OtherPhone,AssistantPhone,Email,Birthdate,Description,PhotoUrl,Middle_Name__c,Email_2nd__c,Gender__c,Last_Contact_Number__c  from Contact';


 return Database.getQueryLocator(query); 
    }
    
    global void execute(Database.BatchableContext bc, List<Contact> cnct)
    {
        
        Contact[] con = new List<Contact>();
        List<Contact> my_list = new List<Contact>();  
        List<Contact> my_list1 = new List<Contact>();
        my_list = cnct; 
     my_list1 =  my_list;
        Contact ct = new Contact(); 
        for (integer i=0; i<cnct.size();i++ )
        {
            ct = my_list[i];
            integer j=0;
            if(i+1 >=my_list.size())    
            {
                ct.FirstName = my_list1[j].FirstName;j++;         
            }
           else
            {
                ct.FirstName = my_list[i+1].FirstName;
            }
            if(i+2 >=my_list.size())    
            {
                ct.LastName = my_list1[j].LastName;j++;
            }
            else
            {
                ct.LastName = my_list[i+2].LastName;
            }
            if(i+3 >=my_list.size())    
            {
                ct.OtherStreet = my_list1[j].OtherStreet;j++;
            }
            else
            {
                ct.OtherStreet = my_list[i+3].OtherStreet;
            }  
            
            
            con.add(ct);
        }    
        update con;
        
        
    }
    
    global void finish(Database.BatchableContext bc)
    { 
    }
}
            
  • November 28, 2016
  • Like
  • 0
Please help me to write the test class for below batch class

global class UpdatesObjectFields implements Database.Batchable<sObject> {
    
    global Database.QueryLocator start(Database.BatchableContext bc)
    {
        String query= 'SELECT Id,FirstName, LastName, OtherStreet,OtherCity,OtherState,OtherPostalCode,OtherCountry,OtherStateCode,OtherCountryCode,OtherLatitude,OtherLongitude,OtherGeocodeAccuracy,OtherAddress,MailingStreet,MailingCity,MailingState,MailingPostalCode,MailingCountry,MailingStateCode,MailingCountryCode,MailingLatitude,MailingLongitude,MailingGeocodeAccuracy,MailingAddress,Phone,Fax,MobilePhone,HomePhone,OtherPhone,AssistantPhone,Email,Birthdate,Description,PhotoUrl,Middle_Name__c,Email_2nd__c,Gender__c,Last_Contact_Number__c  from Contact';


 return Database.getQueryLocator(query); 
    }
    
    global void execute(Database.BatchableContext bc, List<Contact> cnct)
    {
        
        Contact[] con = new List<Contact>();
        List<Contact> my_list = new List<Contact>();  
        List<Contact> my_list1 = new List<Contact>();
        my_list = cnct; 
     my_list1 =  my_list;
        Contact ct = new Contact(); 
        for (integer i=0; i<cnct.size();i++ )
        {
            ct = my_list[i];
            integer j=0;
            if(i+1 >=my_list.size())    
            {
                ct.FirstName = my_list1[j].FirstName;j++;         
            }
           else
            {
                ct.FirstName = my_list[i+1].FirstName;
            }
            if(i+2 >=my_list.size())    
            {
                ct.LastName = my_list1[j].LastName;j++;
            }
            else
            {
                ct.LastName = my_list[i+2].LastName;
            }
            if(i+3 >=my_list.size())    
            {
                ct.OtherStreet = my_list1[j].OtherStreet;j++;
            }
            else
            {
                ct.OtherStreet = my_list[i+3].OtherStreet;
            }  
            
  • November 28, 2016
  • Like
  • 0
I have one custom object name "dedupe account" which is  in look up with standard custom object  Account . There are country custom picklist  field in Account object . I want to display all accounts w.r.to Country and also display only those account who is not associated to dedupe account. How can i do this using lightning  
I have one custom object dedupe account which is  in look up with standard custom object  Account . There are country custom picklist  field in Account object . I want to display all accounts w.r.to Country and also display only those account who is not associated to dedupe account. How can i do this using lightning . 
Hi Guys,
I am working on salesforce to facebook integration using REST API . We need to pull all the data from the facebook . I don't want to use already install package.

So can you please share your code so that i ll refer it
  • February 01, 2017
  • Like
  • 0
global class UpdatesObjectFields implements Database.Batchable<sObject> {
    
    global Database.QueryLocator start(Database.BatchableContext bc)
    {
        String query= 'SELECT Id,FirstName, LastName, OtherStreet,OtherCity,OtherState,OtherPostalCode,OtherCountry,OtherStateCode,OtherCountryCode,OtherLatitude,OtherLongitude,OtherGeocodeAccuracy,OtherAddress,MailingStreet,MailingCity,MailingState,MailingPostalCode,MailingCountry,MailingStateCode,MailingCountryCode,MailingLatitude,MailingLongitude,MailingGeocodeAccuracy,MailingAddress,Phone,Fax,MobilePhone,HomePhone,OtherPhone,AssistantPhone,Email,Birthdate,Description,PhotoUrl,Middle_Name__c,Email_2nd__c,Gender__c,Last_Contact_Number__c  from Contact';


 return Database.getQueryLocator(query); 
    }
    
    global void execute(Database.BatchableContext bc, List<Contact> cnct)
    {
        
        Contact[] con = new List<Contact>();
        List<Contact> my_list = new List<Contact>();  
        List<Contact> my_list1 = new List<Contact>();
        my_list = cnct; 
     my_list1 =  my_list;
        Contact ct = new Contact(); 
        for (integer i=0; i<cnct.size();i++ )
        {
            ct = my_list[i];
            integer j=0;
            if(i+1 >=my_list.size())    
            {
                ct.FirstName = my_list1[j].FirstName;j++;         
            }
           else
            {
                ct.FirstName = my_list[i+1].FirstName;
            }
            if(i+2 >=my_list.size())    
            {
                ct.LastName = my_list1[j].LastName;j++;
            }
            else
            {
                ct.LastName = my_list[i+2].LastName;
            }
            if(i+3 >=my_list.size())    
            {
                ct.OtherStreet = my_list1[j].OtherStreet;j++;
            }
            else
            {
                ct.OtherStreet = my_list[i+3].OtherStreet;
            }  
            
            
            con.add(ct);
        }    
        update con;
        
        
    }
    
    global void finish(Database.BatchableContext bc)
    { 
    }
}
            
  • November 28, 2016
  • Like
  • 0