I've this object relation:

    Group_Test__c   <--->   AssociationGroupOrder   <-->  Order

So I can have a N:N realtion between Groups and Orders.

I'm working with the PHP Toolkit.

Insert records into AssociationGroupOrder is easy, just with:

        $mySforceConnection = new SforceEnterpriseClient();
        $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/wsdlSF.xml');
        $mylogin = $mySforceConnection->login(USERNAME, PASSWORD);

        $records = array();

        //Insert a relationhsip record between Group & Order
        $records[0] = new stdclass();
        $records[0]->Order__c = $orderId;
        $records[0]->Group__c = $groupId;

        $response = $mySforceConnection->create($records, 'AssociationGroupOrder__c');

But, how can I delete a record? As far as I've seen, the SforceEnterpriseClient() class doesn't have a method for it...and it seems that the SOQL neither have a DELETE action in order to accomplish what I need, or am I wrong?

I thougth it would be easy (having the order ID and the group ID) to delete a record. But I can't find the solution...

1 Answer 1


You do have delete method as part of the Standard Salesforce API and also included in the PHP toolkit.

you need to pass in the list / array of record ids to be deleted..

$deleteResult = $mySforceConnection->delete($ids);

here's a reference with sample code


  • Thanks! I only searched in the SforceEnterpriseClient.php file for the delete function. I didn't see the SforceBaseClient.php was included on it, and is in that file where the delete function is implemented. Commented Apr 20, 2015 at 15:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .