#2105 - API Help
From a programming perspective, if I have a bean, and I want a list of related beans that honors SecuritySuite groups, what's the simplest way to go about that? Unless I'm missing something, get_related_list doesn't appear to honor it.
10 years ago
That's correct. The logic hasn't been added to that function as the UI doesn't really use it. For using the SugarBean the only option would be create_new_list_query and passing the filters as needed. Otherwise, you can mimic the Security Group logic embedded in create_new_list_query and apply it to the query that gets generated in get_related_list. It should make sense on how to do that once you take a look, but I'm happy to help with any questions.
10 years ago
Thanks! So, I could basically pass the output of getGroupWhere as the "where" to a list query?
10 years ago
If you copy/paste the SECURITY GROUPS chunk in create_new_list_query to right below where $entire_where is defined (before $query gets assigned) and then replace $where with $entire_where it should work exactly as you would expect it to then.
9 years ago
Closing this out, but feel free to follow up if you have any more questions.