• Vincent.Ip
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
This is more of an FYI, as i did seem to find any where else this was posted.  Hopefully this saves someone from a headache.

I was getting an error message "Duplicate id in list: false" from the following statements.  The exception itself was from the upsert statement.

    List<Chat_Transcript__c> allTranscripts;

    ...
    for ( ... ){
        Chat_Transcript__c currChat = new Chat_Transcript__c();

        ....

        allTranscripts.add(currChat);
    }
    ...
    upsert allTranscripts Chat_Number__c;
 
The records in the allTranscripts had an externalId put into the Chat_Number__c field and all Chat_Transcript__c records in the list were created programmatically with a new Chat_Transcript() statement.  I double checked to make sure that the records within the list did not have duplicate Chat_Number__c values.

Not sure when this bug seemed to show up, but upserting like this caused the error message to appear.  I fixed this by adding the following to the code.
 
 
    List<Chat_Transcript__c> allTranscripts;

    ...
    for ( ... ){
        Chat_Transcript__c currChat = new Chat_Transcript__c();

        currChat.Id = null;
        ....

        allTranscripts.add(currChat);
    }
    ...
    upsert allTranscripts Chat_Number__c;



Don't know if anyone else was having this problem, but hopefully this fix helps you.

I want to preface this message with the fact that this error seems to have cropped up specifically in the Winter '13 release.  We are not seeing this error in our Production org.  

 

In our Winter '13 Sandbox, we are getting an error from the XML DOM removeChild method.

 

We are parsing an XML response using the XML DOM parser and in trying to access a repeating child element underneath another node.  The parent node has a lot of other child elements which we don't care about, so we use the the "getChildElement" method to retrieve the first of the repeating elements, and then we remove it so that the next getChildElement will retreive the following node.

 

when we call the removeChild metod, we are getting a "Salesforce Internal Error" in our Debug logs without much other information.    Is anyone else seeing this error?  And Salesforce, is this a bug in Winter '13?

 

Thanks

 

 

This is more of an FYI, as i did seem to find any where else this was posted.  Hopefully this saves someone from a headache.

I was getting an error message "Duplicate id in list: false" from the following statements.  The exception itself was from the upsert statement.

    List<Chat_Transcript__c> allTranscripts;

    ...
    for ( ... ){
        Chat_Transcript__c currChat = new Chat_Transcript__c();

        ....

        allTranscripts.add(currChat);
    }
    ...
    upsert allTranscripts Chat_Number__c;
 
The records in the allTranscripts had an externalId put into the Chat_Number__c field and all Chat_Transcript__c records in the list were created programmatically with a new Chat_Transcript() statement.  I double checked to make sure that the records within the list did not have duplicate Chat_Number__c values.

Not sure when this bug seemed to show up, but upserting like this caused the error message to appear.  I fixed this by adding the following to the code.
 
 
    List<Chat_Transcript__c> allTranscripts;

    ...
    for ( ... ){
        Chat_Transcript__c currChat = new Chat_Transcript__c();

        currChat.Id = null;
        ....

        allTranscripts.add(currChat);
    }
    ...
    upsert allTranscripts Chat_Number__c;



Don't know if anyone else was having this problem, but hopefully this fix helps you.

Hello

I try to query a query with ID in (list of ids)

 

So i have my list with ids, name ....fields.

List<objectABC> myList = [select  relatedContact__r.id from objectABC];

 

and I need to manage limits and bulkify to create another list of contact with thus ids.

So I try >

List<Contact> lstContact = [select name, adress from contact where Id in :myList.id];

 

But I've got the error

Compile Error: Initial term of field expression must be a concrete SObject: LIST<objectABC>

 

 

How can I do that ?

Thanks so much for your help