AnsweredAssumed Answered

Soap get_entry_list with valid mysql query returns validation error

Question asked by community-support on Jan 13, 2014
Latest reply on Jan 13, 2014 by community-support
I'm trying to access to my SugarCRM v 6.2.6 via nusoap. I have no problems with standart modules, but have a very rare behavior with custom modules.

I have a custom module linked with accounts module. If I try:

[PHP]$info = $client->get_entry_list(

      $session_id,

      'Accounts',

      'accounts.id in (

                                         SELECT donacnes_accounts_c.dona10b2ccounts_ida

                                             FROM donacnes_accounts_c

                                             WHERE donacnes_accounts_c.deleted=0) and accounts.deleted=0',

                                                                     '',

      0,

      array('id',

       'name',

       ),

      10,

      -1

      );[/PHP]

I always get in sugarlog

[PHP]

subquery validation failed: table: donacnes_accounts_c

validation failed subquery

[DEBUG] validation failed WHERE

[ERROR] Bad query: accounts.id in (

                                         SELECT donacnes_accounts_c.dona10b2ccounts_ida

                                             FROM donacnes_accounts_c

                                             WHERE donacnes_accounts_c.deleted=0) and accounts.deleted=0

[/PHP]

Most of the errors are usually made by bad mysql query, but I have checked and the query is totally correct.

Any idea?

(from alejandroCudeca)

Outcomes