I'd like to create a custom search that goes directly to the results page, without asking the user for input parameters (the WHERE clause is hard-coded, no need for inputs). How can I do this?
-
This seems like a similar question: civicrm.stackexchange.com/questions/34489/…– DemeritMay 17, 2020 at 3:40
-
@Demerit, the top voted answer to that question - the method used - did not work for me. But it seems the idea to use a smart group may be a good option.– Paul BMay 18, 2020 at 20:02
2 Answers
Save the result of the custom search as a smart group, then the user can just search using that smart group name.
-
That seems like a good method to use. It's not the ideal solution as it still shows the Search Criteria section (with nothing but two submit buttons since there is no input), but it at least immediately shows the results. Thanks!– Paul BMay 18, 2020 at 20:03
Create a menu item for your custom search and add &force=1
to its URL.
Eg: http://example.org/civicrm/contact/search/custom?csid=1&reset=1&force=1