vtiger Forum Index vtiger
The Honest Open Source CRM
 

Using getListQuery("Contacts") with the web form p
Click here to go to the original topic

 
       vtiger Forum Index -> Web Forms
Previous topic :: Next topic  
Author Message
k o D



Joined: 21 Feb 2008
Posts: 11

Posted: Mon Feb 25, 2008 8:29 am    Post subject: Using getListQuery("Contacts") with the web form p  

Hello everybody!
First please can you be patient? English is not my langage.

Well. This is my problem: I would like use the web form plugin to access and modify data of VTiger. For what? Simply for a business intelligence level.
That's why using web services are the best solution for me.

So I have written one of my functions in soap/webforms.php:

Code: function getListOfContacts() {
   global $adb;
   require_once('include/utils/ListViewUtils.php');
   
   $result = $adb->query("select firstname,lastname from vtiger_contactdetails where accountid is not NULL");
   //$msg = $adb->query_result($result,$adb->num_rows($result),0);
   $monArray = array();
   $i=0;
   while ($row = $adb->fetch_array($result)) {
      $monArray[$i] = $row;
      $i++;
   }
   return json_encode($monArray);
}

getListOfContacts() is running fine but that's not a "sexy" solution because I compose myself the SQL Query.
I would like use the API and particulary the method getListQuery("NAME_OF_MODULE") in include/utils/ListViewUtils.php.

But when i call the function my script crash.
Code: $list_query = getListQuery("Contacts");

I think that's a problem of identification but I don't know how to do...

Thank you a lot for all your explanations and sorry for my bad English. :)
Back to top  
k o D



Joined: 21 Feb 2008
Posts: 11

Posted: Mon Feb 25, 2008 10:56 am    Post subject: Re: Using getListQuery("Contacts") with the web fo  

The problem with the method getListQuery("Contacts") is 2 lines:

Code:    require('user_privileges/user_privileges_'.$current_user->id.'.php');
   require('user_privileges/sharing_privileges_'.$current_user->id.'.php');

It's a problem of authentication... how I can do?
Back to top  
 
       vtiger Forum Index -> Web Forms
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group