Hello,
I'm new here.
I'm trying to dev a API endpoint to random select a User ID.
This user have to be in a team.
My question is: how can I get users inside this Team by Team ID?
I'm new here.
I'm trying to dev a API endpoint to random select a User ID.
This user have to be in a team.
Code:
[
{
"route": "/SortSeller/:teamId",
"method": "get",
"params": {
"controller": "RandomSortSeller",
"action": "randomize",
"teamId": ":teamId"
}
}
]
Code:
<?php
namespace Espo\Custom\Controllers;
class RandomSortSeller extends \Espo\Modules\Crm\Controllers\User
{
public function getActionRandomize($params, $data, $request) {
$teamId = $request->getRouteParam('teamId');
// how can I get users inside this Team by Team ID?
}
}

Thank you very much for sharing. !
Comment