• nil.m.7
  • NEWBIE
  • 30 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies

This list is adding duplicates accounts to the list .

-----------------------------------------------------------------------------------------------------------------------------------------------------


List<ID> accountIds = new List<ID>(); 

 List<Account> accounts = new List<Account>();
        //This is an empty list of contacts which will soon hold all contacts related to the 
                List<Contact> allContacts = new List<Contact>();
                
        //For every contact in our list of contacts...
        for(Contact c: contacts)
        {
            //... if the contact is associated to an account
            if(c.AccountId != null)
            {
                //... add the Contact.AccountId to our list of account Ids.
                accountIds.add(c.AccountId);
            }
           
        }

----------------------------------------------------------<->

 

What Can i use or modify to remove duplicate accounts in the lst .Any help?

can i use @HttpPut with two global static methods in same rest class?

I am getting error like "@HttpPut already used elsewhere in class".

How to resolve this?

can i use @HttpPut with two global static methods in same rest class?

I am getting error like "@HttpPut already used elsewhere in class".

How to resolve this?

How much time Config only sandbox will take to refresh from Production.

  • September 16, 2013
  • Like
  • 0

How much time Config only sandbox will take to refresh from Production.

  • September 16, 2013
  • Like
  • 0

This list is adding duplicates accounts to the list .

-----------------------------------------------------------------------------------------------------------------------------------------------------


List<ID> accountIds = new List<ID>(); 

 List<Account> accounts = new List<Account>();
        //This is an empty list of contacts which will soon hold all contacts related to the 
                List<Contact> allContacts = new List<Contact>();
                
        //For every contact in our list of contacts...
        for(Contact c: contacts)
        {
            //... if the contact is associated to an account
            if(c.AccountId != null)
            {
                //... add the Contact.AccountId to our list of account Ids.
                accountIds.add(c.AccountId);
            }
           
        }

----------------------------------------------------------<->

 

What Can i use or modify to remove duplicate accounts in the lst .Any help?

i want to create a method (via PUT) of the Apex REST web service  to receive a list of string and also the code to invoke it from java.

  • December 06, 2011
  • Like
  • 0