+ Reply to Thread
Results 1 to 4 of 4

Thread: Need help on delete() function

  1. #1
    saariko is offline Junior Member
    Join Date
    Feb 2009
    Posts
    10

    Need help on delete() function

    I am trying to delete, and can't grasp the idea of the Id as Array.

    I want to delete a bulk of Id's at once. I know I need to make an Array, but can't figure out what type of object they need to be in.

    PHP Code:
    $ids = array('a0A200000007v2D');

    $deleteResult $mySforceConnection->delete($ids); 
    Any advise please, thanks.

  2. #2
    ncee is offline Junior Member
    Join Date
    Oct 2007
    Posts
    14
    Code:
        
        require_once ('soapclient/SforcePartnerClient.php');
        
        $mySforceConnection = new SforcePartnerClient();
        $mySoapClient = $mySforceConnection->createConnection("soapclient/partner.wsdl.xml");
        $mylogin = $mySforceConnection->login($user, $pass);
        
        $array = array($id1, $id2);
        $result = $mySforceConnection->delete($array);
        
        print_r($result);
    This code worked for me. Try putting the print_r statement afterwards and see what you get. Also, what kind of record are you trying to delete e.g. contact, account, lead, etc?

  3. #3
    saariko is offline Junior Member
    Join Date
    Feb 2009
    Posts
    10
    Hi Ncee,

    The object I am trying to delete is a custom object, but I don't think it matters.

    As for your example, I still don't understand, what type are the $id1 and $id2 are of? strings??

    Where are they populated from?

  4. #4
    ncee is offline Junior Member
    Join Date
    Oct 2007
    Posts
    14
    I tested my delete out using contact ids. You can find these ids by using the force IDE or by selecting a record in salesforce and looking at the url.

    Are you trying to delete the object or a record in the object?

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO 3.5.1