• Harish Ramachandruni
  • NEWBIE
  • 474 Points
  • Member since 2016
  • Developer and Admin and Integration
  • Salesforce.com

  • Chatter
    Feed
  • 15
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 1
    Questions
  • 200
    Replies
public class SOQL_1 {
    public List<Account> accList     {set;get;}
    //Contructor
    public SOQL_1(){
        accList=[SELECT Name,Phone,Industry,Rating from Account];
    }
}
-----------------------------
Test Class
-----------------------------
@isTest
private class Test_Class_3 {	
	@isTest
    static void accList(){
        SOQL_1 s1=new SOQL_1();
        Account a = new Account();
        a.name='Ravi';
        a.phone='12345';
        insert a;
        
        Account a2=[Select Id,Name,Phone from Account where name='Ravi' LIMIT 1];
        System.assert(a2!=null);        
    }    
}
Is this Correct.
 
Hi There,  Can anyone help me with rollup summary trigger on Accounts and Order. I want to populate the Count of Orders on Account and when Order is deleted Account Count should update. Thanks in advance.
  • April 20, 2018
  • Like
  • 0
i have this query, select id, accountid, seccon__r.accountid from contact..
now how to write the same query to check if accountid is equal to  seccon__r.accountid ?
Hi ,

I write a apex class on task object which will insert a record.

Public class InsertTaskForDEMO {
 
 public static void newtask()
{ List<Task> ACCD  = new List<Task>();

for (Integer i=0; i<3; i++)
 {
 Task Act = new Task(Status='Not Started',Subject='Other');
   ACCD.add(Act);
   insert ACCD;
}}}

i want to call this newtask method in trigger made on custom object 

trigger checkpromotiondetails on Task (after insert)
{
for (Demo__c Task :trigger.new)
{ if (Demo__c.Eligible_for_Bouns__c = 'True')
{
InsertTaskForDEMO.newtask();
}
}}

while trying to same it is givning me error.

 
Hi all,

Just getting started with Apex and Visualforce pages and I hope someone can help me out here.  We have account reps who need me to create a public-facing contact entry page that takes a parameter. The parameter is just for tracking purposes and is written to a custom field called Lead_Channel__c. (So the URL is something like http://ourorg.force.com/?Lead_Channel=<eventname> and the parameter is written to Lead_Channel__c).

The idea is to get the person's contact information - First/Last name, email, phone, title... and Company Name.

The trick is that Company Name - it's an Account field, not a Contact field. I have the page working to create the Contact right now, but they want it to create a new Account and Contact. 

Here's my VF page code, after my having added a field for the Contact.Account.Name (the working version simply omits that line):
<apex:page controller="ContactCreateController" showHeader="false" sidebar="false">
	<apex:sectionHeader subtitle="Create a Contact" />
	<apex:form style="margin-left: 210px; margin-top: 50px; margin-bottom: 100px; margin-right: 210px;">
		<apex:pageMessages />
		<apex:pageBlock title="New Contact Entry">
			<apex:pageBlockButtons >
				<apex:commandButton action="{!save}" value="Save"/>
			</apex:pageBlockButtons>

			<apex:pageBlockSection showHeader="false" columns="2">
				<apex:inputField value="{! Contact.FirstName }" />
				<apex:inputField value="{! Contact.LastName }" />
				<apex:inputField value="{! Contact.Email }" />
				<apex:inputField value="{! Contact.Phone }" />
				<apex:inputField value="{! Contact.Title }" />
				<apex:inputField value="{! Contact.Account.Name }" />
			</apex:pageBlockSection>
		</apex:pageBlock>
	</apex:form>
</apex:page>
And here's the Custom Controller code - without changes to insert the Account based on the name, first.
 
public with sharing class ContactCreateController {
    private String leadChannel {get;set;}
    // the contact record you are adding values to
    public Contact contact {
        get {
            if (contact == null)
                contact = new Contact();
            return contact;
        }
        set;
    }
    
    public ContactCreateController() {
        /* Extract lead channel from URL and assign to variable */
        leadChannel  = ApexPages.currentPage().getParameters().get('Lead_Channel');
    }
    
    // save button is clicked
    public PageReference save() {
        try {
            contact.Lead_Channel__c  = leadChannel; /*Save lead channel to contact */
            insert contact; // inserts the new record into the database
        } catch (DMLException e) {
            ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Error creating new contact.'));
            return null;
        }
        
        // if successfully inserted new contact, then displays the thank you page.
        return Page.ContactCreateThankyou;
    }
}

The ContactCreateThankYou page simple displays the new data and then any other additions the reps want to add in.

Can anyone help me to modify my code to get that Account added? 

Thanks,

Jamie
 

Hi,

I'm pretty new to Visualforce, although I have coding experience in other languages.  I've never built a test class for a custom controller before, and looking for some guidance.  Here is the controller code:
 
public class ParentCntacts {
    
    public List<Account> accts {get;set;}
    public Account thisAcct {get;set;}

    
    public ParentCntacts() {
    thisAcct = [Select id, Name, ParentId FROM Account WHERE id = :ApexPages.currentPage().getParameters().get('id')];
    }
    
    public List<Account> getCon() {
        accts = [SELECT id, Name, ParentId, (SELECT id, Name, Title, Main_CSM_Contact__c, Decision_Maker__c, 
            No_Longer_At_Company__c, HasOptedOutOfEmail, Role_Contact_updated__c, Email, Phone, LinkedIn_Profile__c FROM Contacts) FROM Account WHERE Id = :thisAcct.ParentId];

        return accts;
    }
}

Visualforce markup is:
<apex:page controller="ParentCntacts" >
    <apex:pageBlock >
        <apex:repeat value="{!con}" var="a">
            <apex:pageBlockSection ><b>{!a.Name}</b></apex:pageBlockSection>
            <apex:pageblockTable value="{!a.Contacts}" var="c">
                <apex:column headerValue="Contact Name">
                    <apex:outputLink id="link" value="https://cs54.salesforce.com/{!c.Id}" target="_blank" >{!c.Name}</apex:outputLink>
                </apex:column>
                <apex:column value="{!c.Title}" />
                <apex:column value="{!c.Main_CSM_Contact__c}" />
                <apex:column value="{!c.Decision_Maker__c}" />
                <apex:column value="{!c.No_Longer_At_Company__c}" />
                <apex:column value="{!c.HasOptedOutOfEmail}" />
                <apex:column value="{!c.Role_Contact_updated__c}" />
                <apex:column value="{!c.Email}" />
                <apex:column value="{!c.Phone}" />
                <apex:column value="{!c.LinkedIn_Profile__c}" />
            </apex:pageblockTable>
        </apex:repeat>
    </apex:pageBlock>
</apex:page>

The page gets put on the layout and shows contacts on a Parent Account record (shown on a child record).

Any help greatly appreciated, thanks in advance.
public class RecordCreations 
{
    public string name{set;get;}
    public account acc{set;get;}
    public contact con{set;get;}
    public pagereference createAccount()
    {
        acc=new account();
        acc.name=name;
        insert acc;
        pagereference pr = new pagereference('/'+acc.id);
        return pr;
    }
    public pagereference createContact()
    {
        con=new contact();
        con.lastname=name;
        insert con;
        pagereference p = new pagereference('/'+con.id);
        return p;
    }
}
<apex:page controller="RecordCreations">
    <apex:sectionHeader title="Record Creations" subtitle="Accounts & Contacts creations"/>
    <apex:form >
        <apex:pageBlock >
        <apex:pageBlockButtons location="bottom">
            <apex:commandButton value="Account" action="{!createAccount}"/>
            <apex:commandButton value="Contact" action="{!createContact}"/>
                </apex:pageBlockButtons>
            <apex:pageBlockSection >
                <apex:inputText Label="Enter Name : " value="{!name}"/>
            </apex:pageBlockSection>
            </apex:pageBlock>
    </apex:form>
</apex:page>

User-added image
After clicking account, the code works fine and below page comes.
User-added image
But when I click contact button, The error comes, request you to debug the error and let me know.
Thanks in advance.User-added image
Hi All,

Below is my Apex Class for which i have got 72% Code coverage and want to make it to 75%.
Apex Class :
public class myWeb2LeadExtension {

    private final Lead weblead;

    public myWeb2LeadExtension(ApexPages.StandardController
                                stdController) {
       weblead = (Lead)stdController.getRecord();
    }

     public PageReference saveLead() {
       try {
       insert(weblead);
       }
       catch(System.DMLException e) {
           ApexPages.addMessages(e);
           return null;
       }
       PageReference p = Page.ThankYou;
       p.setRedirect(true);
       return p;
     }
}

Out of the above lines only the below lines are not getting covered.Please Help...!

PageReference p = Page.ThankYou;
       p.setRedirect(true);
       return p;

Thanks for any help in Advance...!
global with sharing class AccountUtilities {
   
   webservice static String getAssociates(String accid) {

      
      Account accs = 
         [select id,
         (select id,Associates__c,Name from Contacts 
         where Status__c = 'Primary Contact') from Account 
         where id = :accid LIMIT 1];
      
      list<contact> contacttoUpdate = new list<contact>();
      if(accs.Contacts != null && accs.Contacts.size() > 0 )
      {
          
          list<string> Names = new list<string>();
          
          for(Contact con : accs.Contacts)
          {
              Names.add(con.Name);
          }
          
          for(Contact con : accs.Contacts)
          {
              system.debug('Names:'+Names);
              string Associates = '';
              integer ncount = Names.size();
              integer count = 1;
              
              for(string n : Names)
              {
                   
                  system.debug('n:'+n);
                  if(con.Name != n)
                  {
                      count++;
                      if(Associates == '')
                          Associates += n;
                      else
                      {
                          system.debug('nc::'+ncount);
                          system.debug('c::'+count);
                          
                          if(count!= 1 && count == ncount)
                              Associates += ', and '+ n;
                          else
                              Associates += ', '+ n;
                      }
                  }
                  
                     
              }        
              
              
              con.Associates__c = Associates;
              con.Email_Campaign__c = 'Enrolled';
              contacttoUpdate.add(con);
              
          }
      }
      else
      {
          return 'No Primary Contact found for this Account';
      }
      
      
      
      try {
         Database.update(contacttoUpdate);
      }
      catch (DmlException e) {
         return e.getMessage();
      }

      
      return 'Contact associated succesfully';
      
   }
}

 
In lookup relationship, say, Contact has lookup relationship with Account object. Therefore, when a Contact record is created, there is a lookup field to add Account by click. Every Contact record associated with Account record will be displayed in Related list of Account object. I want the opposite situation. When the contact is created, the associated Account record need to be displayed in contact.
So far, I am doing it by creating another lookup relationship from Account to Contact. But, there should be more straightforward way to do this! Creating Contact Record
Related List in Account Record
Related List of Contact in Account Record 
I need a Related List of Account in Contact Records.
  • October 14, 2016
  • Like
  • 0
I have a scenario where the user has to slect the account and redirect to a new vf page but I am not able to pass the account id so that the new page displays the details about the selected account. I have posted the vf page and controller code.

Thanks in Advance!
 
<apex:page controller="pagination" tabStyle="Account">
<apex:form >
  <apex:pageBlock >
  Page No: {!pageNo} <br/><br/>
      <apex:pageBlockTable value="{!Accounts}" var="a" rows="10">
          <apex:column >
              <apex:actionSupport action="{!account}" event="onclick">
              <apex:outputtext value="{!a.id}"/>
              </apex:actionSupport>
          </apex:column>
          <apex:column >
          {!a.name}
          </apex:column>
      </apex:pageBlockTable>
  </apex:pageBlock>
  <apex:commandButton value="Previous" action="{!previous}" disabled="{!!hasPrevious}"/>
  <apex:commandButton value="Next" action="{!next}" disabled="{!!hasNext}"/>
  </apex:form>
</apex:page>
public class pagination {
    Public Integer size{get;set;}
    Public Integer noOfRecords{get; set;}
    Account accnt;
    Public Integer pageNo {
    get {
            if(pageNo == null) {
                return 1;
            }
        return pageNo;
        }
    set;
    }
    public ApexPages.Standardsetcontroller setcon {
    get {
        if(setcon == null) {
        size = 5;
        string querystring = 'select name,type from account order by name';
        setcon = new ApexPages.Standardsetcontroller(Database.getQueryLocator(querystring));
        setcon.setpagesize(size);
        noOfRecords = setcon.getResultSize();
        }
        return setcon;
    }
    set {}
    }
    public list<Account> getAccounts () {
        List<Account> accntList = new List<Account>() ;
        for(Account a: (List<Account>) setcon.getRecords()) {
            accntList.add(a);
        }
        return accntList;
    }
    public void setAccount (Account accnt) {
        this.accnt = accnt;
        System.debug('@@'+accnt);
    }
    public void next() {
        pageNo = pageNo+1; 
        setcon.next();
    }
    public void previous() {
        pageNo = pageNo-1;
        setcon.previous();
    }
    public Boolean hasNext {
        get {
            return setCon.getHasNext();
        }
        set;
    }
    public boolean hasPrevious {
        get {
            return setCon.getHasPrevious();
        }
        set;
    }
    public PageReference account() {
        //Account accnt;
        PageReference ref = new PageReference('/apex/wizard2?id='+accnt);
        ref.setRedirect(true);
        return ref;
    }
}


 
Hi i have a requirment, i have a multipicklist field with values(India,chaina,usa) if i select any one of this values i want to be header of the page.
for example if i select INDIA  and click on save button.it add as a Header of the page.is it possible to do??
thanks for advace

<apex:page controller="customPickListInVFDemoController" tabStyle="Account" > 
  <apex:form >
    <apex:pageBlock id="out">
        <apex:pageBlockButtons >
            <apex:commandButton value="Save" action="{!save}" rerender="out" status="actStatusId"/>
            <apex:actionStatus id="actStatusId">
                <apex:facet name="start">
                    <img src="/img/loading.gif" />
                </apex:facet>
            </apex:actionStatus>
        </apex:pageBlockButtons>
        <apex:pageBlockSection title="Target Audiance" collapsible="false">
            <apex:selectList value="{!selectedCountry1}" multiselect="True" size="1">
                
                <apex:selectOption itemValue="India" itemLabel="India"/>
                <apex:selectOption itemValue="usa" itemLabel="usa"/>
            </apex:selectList>
            <apex:outputText value="{!selectedCountry1}" label="You have selected:"/>
        </apex:pageBlockSection>
     </apex:pageblock>
  </apex:form>
</apex:page>

public class customPickListInVFDemoController {
public String selectedCountry1{get;set;}
public String selectedCountry2{get;set;}
    public customPickListInVFDemoController(){
    }
     
    public List<SelectOption> getCountriesOptions() {
        List<SelectOption> countryOptions = new List<SelectOption>();
        
        countryOptions.add(new SelectOption('india','india'));
        countryOptions.add(new SelectOption('usa','usa'));
        return countryOptions;
    }
    public PageReference save(){
        return null;
    }
}
Hi,

I tried some code, but it is not working.

/Trigger to Count the Number of Attachments on an Object

trigger countattachment on Attachment (after insert, after update, after delete, after undelete) {
  Map<Id,List<Attachment>> parent = new Map<Id,List<Attachment>>();
  set<id> attids = new set<id>();
     
   if(Trigger.new<>null){
       for(Attachment c:Trigger.new){
           MDF__c l;
           if(c.ParentId != null)
               attids.add(c.parentid);
       }
           
   }else if(Trigger.old != null){
       for(Attachment c:Trigger.old){
           if(c.ParentId<>null)      
               attids.add(Trigger.oldMap.get(c.id).parentid);
       }
   }
   if(attids.size()>0){
       try{
           List<Attachment> a = new List<Attachment>();
           Map<id,MDF__c> testmap = new Map<id,MDF__c>([select id,CountAttachment__c from MDF__c where id IN: attids]);
           a = [select id,parentid from Attachment where parentid IN:attids];
           
           for(Attachment at: a){
               List<Attachment> llist = new List<Attachment>();
               if(parent.get(at.parentid) == null){
                   llist = new List<Attachment>();
                   llist.add(at);
                   parent.put(at.parentid,llist);
               }else if(parent.get(at.parentid) != null){
                   llist = new List<Attachment>();
                   llist = parent.get(at.parentid);
                   llist.add(at);
                   parent.put(at.parentid,llist);
               }
           }
           
           for(Id i: attids){
               if(testmap.get(i) != null && parent.get(i) != null){
                  testmap.get(i).CountAttachment__c = parent.get(i).size(); 
               
               }else if(testmap.get(i) != null && parent.get(i) == null){
                  testmap.get(i).CountAttachment__c = 0; 
               }
           }
       
           update testmap.values();
           System.Debug(testmap.values());
       }catch(Exception e){}
    }

}
  • September 17, 2016
  • Like
  • 0
Hi,


I tried  but its not working

//Controller class for LoginPagePartners(custom login page) for Partner users
global class CustomLogin{
   //Declare Email and password fileds
    global String Email{get; set;}
    global String pwd {get; set;}c
    
    //getting Email and Password values  
     global void getEmail(){
     Email=System.currentPageReference().getParameters().get('Email');
     }
        
     global void getpwd(){
     pwd=System.currentPageReference().getParameters().get('pwd');
     }
     //Actual Login button functionality
     global PageReference login(){ 
     //setting redirect URL     
     String startUrl = '/partners';
     //Using Site.login(string,string,string) standard functionality 
     PageReference ref = Site.login(Email, pwd, startUrl);
     return ref;
             
    }
}
  • September 17, 2016
  • Like
  • 0
hear is my controller class--------------------->
public class actionFunctionController {
    public Position__c poc{get;set;}
    public Boolean show{get;set;}
    public Boolean showmessage{get;set;}
    
    public actionFunctionController(ApexPages.StandardController stdController){
        poc=[select id,name,Hire_By__c,Hiring_Manager__c,Job_Level__c,Functional_Area__c,Job_Description__c,Location__c,Max_Pay__c,Min_Pay__c,Open_Date__c,Responsibilities__c,Travel_Required__c,Type__c,Status__c,Cancellation_Reason__c from Position__c where id=:ApexPages.currentPage().getParameters().get('id')];
        show = false;
    }
    public PageReference Savefun(){
        try{
            if(poc.Status__c =='Cancelled' && poc.Cancellation_Reason__c == null){
                showmessage = true;    
                return null;
                }  
            else{
                update poc;
                showmessage=false;
                PageReference newPage = new PageReference('https://ap2.salesforce.com/'+ApexPages.currentPage().getParameters().get('id'));
                return newPage;
                }
            }
        catch(Exception e){
            ApexPages.addMessages(e);
            return null;
        }
        return null;
        
    }
    public PageReference priorityChanged(){
        if(poc.Status__c == 'Cancelled'){
            show = true;
        }
        else{
            show = false;
        }
        return null;
    }
}

vf page--------------->
<apex:page standardController="Position__c" extensions="actionFunctionController">
    <style>
     .myCustomMessage .message {color: Red !important;}
    </style>
    <apex:form >
        <apex:pageBlock title="{!$User.FirstName}">
            <apex:pageBlockButtons >
                <apex:commandButton value="sAVE" action="{!Savefun}"/>
                <apex:commandButton value="cANCEL" action="{!cancel}" />
            </apex:pageBlockButtons>
        <apex:actionFunction name="priorityChangedJavaScript" action="{!priorityChanged}" rerender="out"/>
            <apex:pageBlockSection title="Please Enter The Changes" columns="1" id="out" collapsible="false">
                <apex:inputField value="{!poc.name}"/>
                <apex:inputField value="{!poc.Hire_By__c}"/>
                <apex:inputField value="{!poc.Hiring_Manager__c}"/>
                <apex:inputField value="{!poc.Job_Level__c}"/>
                <apex:inputField value="{!poc.Functional_Area__c}"/>
                <apex:inputField value="{!poc.Job_Description__c}"/>
                <apex:inputField value="{!poc.Location__c}"/>
                <apex:inputField value="{!poc.Max_Pay__c}"/>
                <apex:inputField value="{!poc.Min_Pay__c}"/>
                <apex:inputField value="{!poc.Open_Date__c}"/>
                <apex:inputField value="{!poc.Responsibilities__c}"/>
                <apex:inputField value="{!poc.Travel_Required__c}"/>
                <apex:inputField value="{!poc.Type__c}"/>
                <apex:inputField value="{!poc.Status__c}" onchange="priorityChangedJavaScript()"/>
                <apex:inputField value="{!poc.Cancellation_Reason__c}" rendered="{!show}"/>
                <apex:outputPanel styleClass="myCustomMessage" rendered="{!showmessage}">
                <apex:pageMessage severity="error" strength="1" summary="Please enter the reason" />
                </apex:outputPanel>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
Hi,

My client travel tourist  travel agent he want to give log in to customers who are looking to travel to another countries . main thing is he his domestic customer from India how can sagest to him about salesforce customer portal main thing on licence cost  .


Regards ,
Harish.R.
Looking for a Salesforce Freelance Developer - Melbourne Based to work with for a few development requiring JS button and Apex trigger & code update.Post to Community

Walker & Dunlop - a publicly traded, nation-wide real estate financing firm - is seeking a Senior Salesforce Developer with expert-level experience in Lightning, Apex and Visualforce development.

Please review the job details at the following link and apply directly if you qualify: https://recruiting.ultipro.com/WAL1008/JobBoard/4784c477-474e-4a3f-9b0a-f583b5912ffc/OpportunityDetail?opportunityId=c74a0490-b05a-44b8-a659-6d3b3c2098ff 

I am looking for a developper to help me with building the CRM platform into a business office to be used by my staff - please contact me to discuss details. this would be a larger job.
Looking for experienced SalesForce Developers. Candidates need to have experience with APEX. We have two roles, one lead and one for a developer. This is in Minneapolis, MN. Please contact me for details!
Hi, I need to change the company logo on a page our company's web-site which is hosted by Job Science. See below link to page http://tfrecruitment.force.com/jobs. How do I do this?

I do not come from and IT backgound so intruction in laymans terms would be great.

Thanks.
Hiring: Consultant for salesforce database strategy/potential implementation at nonprofit. The goal of this project is to design a comprehensive technology solution on the Salesforce platform that meets the fundraising and communications/marketing needs of the agency. Bids should be submitted by July 1st. To learn more, visit http://bit.ly/OAsfconsultant or contact kogonek@osborneny.org. Thanks!
public class SOQL_1 {
    public List<Account> accList     {set;get;}
    //Contructor
    public SOQL_1(){
        accList=[SELECT Name,Phone,Industry,Rating from Account];
    }
}
-----------------------------
Test Class
-----------------------------
@isTest
private class Test_Class_3 {	
	@isTest
    static void accList(){
        SOQL_1 s1=new SOQL_1();
        Account a = new Account();
        a.name='Ravi';
        a.phone='12345';
        insert a;
        
        Account a2=[Select Id,Name,Phone from Account where name='Ravi' LIMIT 1];
        System.assert(a2!=null);        
    }    
}
Is this Correct.
 
Hi There,  Can anyone help me with rollup summary trigger on Accounts and Order. I want to populate the Count of Orders on Account and when Order is deleted Account Count should update. Thanks in advance.
  • April 20, 2018
  • Like
  • 0
public class AccountContactOppurtunitycon {
       
   public AccountContactOppurtunitycon()
   {
    accountid = new set<id>();
    for(OpportunityContactRole contactRole : [select ContactId , Contact.Name, opportunityId ,opportunity.Name ,opportunity.Amount, opportunity.Account.Name,Opportunity.AccountId  from OpportunityContactRole]){
     accountid.add(ContactRole.Opportunity.AccountId);
     for(InnerClass ic :accountid){
      }
   }
 }
   public class InnerClass{
      Public opportunity opportunityList{get; set;}
      Public list<OpportunityContactRole> contactRole{get;set;} 
    }
      
     public List<InnerClass> innerList{get; set;}
      Public list<OpportunityContactRole> contactRole{get;set;}
        set<Id> accountid{get; set;}
   
}
My output should be 

table 1
  Account Name : 1st record
   opportunityid    contact  AccountName  amount
 
table 2
  Account Name : 2nd record
   opportunityid    contact  AccountName  ammount
 
Hello Everybody,

Issue : Green/Red highlight is not working in Developer console while testing.

We always use to debug Test class using devoper console. Green Red highlights will help us to find the codes covered and codes not covered. I'm really not sure why it is not working in Sandbox. Could you please help me in figuring it out?
I submitted the following code which executed successfully, but on checking the challenge I keep getting the message that it is not complete:

public class StringArrayTest {
    public static List<String> generateStringArray(Integer numberOfItems){
        List<String> strResult = new List<String>();
        for(Integer i = 0;i < numberOfItems;i++) {
            strResult.add('Test '+ (i+1));
            System.debug(strResult[i]);
        }
        return strResult;
    }
}

Can someone please help me with this
i have this query, select id, accountid, seccon__r.accountid from contact..
now how to write the same query to check if accountid is equal to  seccon__r.accountid ?
Without mannually How to add multiple object permission (around 200) at a time  in permission set

Thanks!!
hello everyone, i want to check entered year is leap year or not , what is code for this in apex ?
Rare opportunity to join a Fortune 500 technology team in NYC.  Our client is looking for a seasoned Salesforce Developer to join their tech group.
Some requirements include: Bachelor's degree, 2 or more years as a full-time Salesforce Developer (expertise with APIs, Apex, Visualforce, etc.), experience with Lightning, agile, JavaScript, XML, JSON, SOQL, SOAP, REST Web Services, HTML-Experience working in an agile environment and excellent communication and customer service skills.

Additional Information:
*Full-time, salaried position
*On-site
​*CLIENT CANNOT PROVIDE SPONSORSHIP OR WORK C2C AT THIS TIME*
We've opened a case with salesforce already but wanted to see if anyone else has experienced slowness in their sandboxes since Winter 17 release. Our deploy's were taking 30 minutes with unit tests and now are taking in excess of 2 hours. Using the migration tool to deploy it will often hang for 5 - 10 minutes before. Just wanted to check as it has been a painful week.