SugarCRM Soap v2 Modules and Link Fields lister

Here at ANAT we use SugarCRM. A reasonably good, open source and free Customer Relations Management System which is used to keep the membership database information, send out monthly digest emails to subscribers, do document control, and much more.

Unfortunately it has a downside that isn’t initially apparent when you install it. It’s SOAP API is dirty.

What I mean by this is that you THINK you should be able to do something, like write a script to add a new user and subscribe them to the newsletter, (what SugarCRM calls a prospect_list), but when you actually try it, you find there’s very little documentation, and in some cases doesn’t even work.

What’s more, there’s two SOAP API’s. The default one that you’ll likely come across is the v1 API. For those who have had their hearts ripped out by that and are moving on to try the v2 API I’ve written up a module and link_field lister.

Once you’ve put your URL, username and password in, the script will connect to your SugarCRM SOAP, then run through and list all of the available modules, their fields, and also the Link fields, which is a crucial way of accessing related modules and information in most of the v2 API calls, yet is barely explained in any of the docs.

Note that the script uses the nusoap libraries (included in the zip file) and YOU WILL NEED TO EDIT THE URL, USERNAME, and PASSWORD variables at the top of the script to point to your SugarCRM install with a valid username and password.

About michaelkubler

Michael Kubler was the Technical officer for ANAT during 2010. He is a Linux system admin, PHP programmer, and innovative geek who wants to change the world using disruptive innovation.
This entry was posted in Code. Bookmark the permalink.

3 Responses to SugarCRM Soap v2 Modules and Link Fields lister

Leave a Reply

Your email address will not be published. Required fields are marked *