AnsweredAssumed Answered

How do I find the teams for the account currently being saved?

Question asked by Derick van Niekerk on Nov 27, 2016
Latest reply on Nov 27, 2016 by Derick van Niekerk

I have some logic that should get activated when an account is assigned to specific teams. If any of the teams associated with the account matches a team in this list, the logic should get triggered.

 

From the logic hook:

$teamSetBean = new TeamSet();
//Retrieve the teams from the team_set_id
$teams = $teamSetBean->getTeams($accBean->team_set_id);

In this case $teams contain the values of the teams assigned to the account *from the database*

 

I need the result as it's being saved right now.

 

When inspecting the bean, I find the results I need inside:

$accBean->teams->_teamList

But this is a private variable! I can't find any way to retrieve the data contained in the _teamList array. Even calling:

$accBean->teams->get()

just gets the data from the database.

 

How do I get the information for the teams currently being saved to the account?

Outcomes