Results 1 to 2 of 2

Thread: delete all records from a module using SOAP?

  1. #1
    mike.smedley is offline Junior Member
    Join Date
    Nov 2011
    Posts
    9

    Default delete all records from a module using SOAP?

    I have a custom module (Accounts Receivable). Each night, through a batch process, I am refreshing these records from an external source. In this refresh, I delete all A/R records, and then load new ones from my external source. The only way I know to delete records is by calling set_entries with an array of name-value lists like so:
    array(
    array( 'name' => 'id' , 'value' => '%s' ),
    array( 'name' => 'deleted' , 'value' => "1" )
    );

    Is there any way I can do something more efficient, like UPDATE table_name SET deleted = 1 ?

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: delete all records from a module using SOAP?

    You can't execute ad-hoc queries though the SOAP interface, unfortunately, so there is no efficient way to do it. You could try using set_entries() instead though, that might help you a bit.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. delete records
    By AConceicao in forum Developer Help
    Replies: 1
    Last Post: 2010-10-26, 05:42 PM
  2. delete main & sub records
    By mikesolomon in forum Help
    Replies: 2
    Last Post: 2008-04-09, 12:48 PM
  3. How to delete records with the Sugar SOAP API?
    By sugarmichael in forum Developer Help
    Replies: 1
    Last Post: 2008-03-12, 09:55 PM
  4. Delete all records inside a certain module?
    By spac1x in forum Developer Help
    Replies: 5
    Last Post: 2008-02-21, 01:51 PM
  5. Delete Records
    By cexar in forum Help
    Replies: 0
    Last Post: 2006-04-26, 07:15 PM

Tags for this 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
  •