SugarCRM Developers on Twitter

Get field properties for a module via Web Services

I saw this thread on StackOverflow recently, and after chiming in with a response I thought it would be something worth touching on in a blog post. Basically, how does one get some of the attributes for a field using web services.

You can easily do this with a call to the get_module_fields web services call like this…

This gives you back a huge data structure with all of the details. Here’s what it looks like…

This gives you all the field defintion details, include type, display label, and options if it’s a dropdown or multienum field. All strings will be translated according to the current user’s language preference as well.