How To Get All Related Teams Using Beans

sugarcrmdevelopers —  November 5, 2012 — Leave a comment

Editor’s Note: This post comes from Michael Joyner, who is a SugarCRM engineer for a Health Care company that uses SugarCRM to manage the Cancer Patient process in hospitals. Thanks Micheal for this great tip!

I recently faced the challenge of creating a custom user interface based on the Team that was associated to an Account. Any number of teams could create its own unique page. After I looked online and found there was hardly any information. I wanted to find a solution that would leverage using the Bean methods rather than building all sorts of SQL statements.

So what to do?

I pointed my trusty code editor to “modules/Teams” and right there starring me in the face was “TeamSets.php” and “Team.php”. I opened them up and VIOLA…… I found gold. Both objects had the exact methods I needed.

Below uses Team and TeamSets objects and iterates thru each Team as it traverses all the Accounts.

No Comments

Be the first to start the conversation!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s