4 Replies Latest reply: Jan 19, 2012 5:01 AM by 909442 RSS

    Delete all Address of a contact

    909442
      Hi i'm trying to delete all the addresses for a contact but i got an error:

      IDS_ERR_EAI_SA_NO_USERKEY
      No user key can be used for the Integration Component instance

      i use the following xml:

      <soapenv:Body>
      <ns:ContactUpdate_Input>
      <quer:ListOfContact>
      <quer:Contact>
      <quer:Id>AHKA-1F1DSJ</quer:Id>
      <quer:ListOfAddress>
      <quer:Address>
      </quer:Address>
      </quer:ListOfAddress>
      </quer:Contact>
      </quer:ListOfContact>
      </ns:ContactUpdate_Input>
      </soapenv:Body>


      Is there a way to delete all in one call and not AddressId by AddressID?

      Any help will be welcome :)
        • 1. Re: Delete all Address of a contact
          Runndn2-Oracle
          You can delete all child object for a parent object by including a empty tag for any child on a update.
          • 2. Re: Delete all Address of a contact
            909442
            Hi,

            What do you intend by "empty tag" as i have tried with


            <soapenv:Body>
            <ns:ContactUpdate_Input>
            <quer:ListOfContact>
            <quer:Contact>
            <quer:Id>AHKA-1F1DSJ</quer:Id>
            <quer:ListOfAddress>
            <quer:Address>
            <quer:Id>AHKA-1G1ALH</quer:Id>
            </quer:Address>
            </quer:ListOfAddress>
            </quer:Contact>
            </quer:ListOfContact>
            </ns:ContactUpdate_Input>
            </soapenv:Body>



            and no address was deleted
            • 3. Re: Delete all Address of a contact
              dinesh_crmit
              There are two ways to do it

              1. Query all address, then delete them by DeleteChild method (WS V1.0)

              2. Update the Contact with no address, it would remove all address

              <soapenv:Body>
                   <ns:ContactUpdate_Input>
                        <quer:ListOfContact>
                             <quer:Contact>
                             <quer:Id>AHKA-1F1DSJ</quer:Id>
                             <quer:ListOfAddress>
                                  <quer:Address>
                                       
                                  </quer:Address>
                             </quer:ListOfAddress>
                             </quer:Contact>
                        </quer:ListOfContact>
                   </ns:ContactUpdate_Input>
              </soapenv:Body>
              • 4. Re: Delete all Address of a contact
                909442
                Hi Dinesh,

                I have already tried this way (beginning of the thread) but in that case i got

                No user key can be used for the Integration Component instance 'Contact_CUT Address'.(SBL-EAI-04397)


                Do you have an exemple of DeleteChild Method please?