I have been playing around with SOAP on 5.5.1RC2 CE and have run across an issue with the search_by_module. I am attempting to use this call to look-up a contact via an email address.
I can successfully make a call to get_entry_list but when I use search_by_module the error:
{'description': 'Login attempt failed please check the username and password', 'number': '10', 'name': 'Invalid Login'}, 'entry_list': [], 'result_count': -1}
is returned. Below are examples of the two methods I am working with. It is written in python but the code should be straight forward. I do not think it is a log on issue because I do the exact same thing for the get_entry_list. Any ideas? I have checked the threads and it appears this method should work in RC2.
Thanks in advance
Marc
auth = {'user_name': USERNAME, 'password': md5.new(PASSWORD).hexdigest(), "version": "1.1"}
def sugar_search_by_module():
sugar = SOAPpy.WSDL.Proxy(SUGAR_URL)
session = sugar.login(auth, "admin")
module = "Contacts"
try:
response = sugar.search_by_module(session['id'],"xxx@gmail.com",module)
print response
except StandardError, err:
print '\nError in information retrieval from SugarCRM:' + str(err)
def sugar_contact_lookup():
sugar = SOAPpy.WSDL.Proxy(SUGAR_URL)
session = sugar.login(auth, "admin")
module = "Contacts"
query = "Contacts.last_name = 'Smith'"
try:
response = sugar.get_entry_list(session['id'], module, query)
print response
except StandardError, err:
print '\nError in information retrieval from SugarCRM:' + str(err)
Bookmarks