Answers.Body: <p>Start with the code for Find Contributions (<a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/SearchContribution.php">https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/SearchContribution.php</a>) and customize it as necessary to get the results you want, eg by hardcoding some values.</p>
  
  <p>Next, choose a task similar to what you want to do from the list at <a href="https://github.com/civicrm/civicrm-core/tree/master/CRM/Contribute/Form/Task">https://github.com/civicrm/civicrm-core/tree/master/CRM/Contribute/Form/Task</a>, and copy and modify it as necessary. Next, after reviewing  <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Task.php">https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Task.php</a>, find a hook like buildForm to modify the search form so it includes your new task(s).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-24T18:25:29.467Z
Answers.LastActivityDate: 2015-03-24T18:25:29.467Z
Answers.UserDisplayName: Joe Murray
Body: <p>I've followed the <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Custom-Search+Extension">documentation</a> to create a custom search and I find this capability to be quite powerful for finding and displaying information about contacts.</p>
  
  <p>Now I would like to create a custom search to show a specific set of <em>contributions</em> and then (most importantly) allow me to perform actions on those specific contributions (e.g. "export contributions", "send thank-you letters").  </p>
  
  <p>Is this possible? If so, how? </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-24T09:37:09.057Z
Comments.Text: You may be interested by this post :
  https://civicrm.stackexchange.com/questions/25078/smart-group-features-extension-to-memberships-events-contributions-activities
Comments.UserDisplayName: Jacques-Marie Moranne
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-24T16:46:00.750Z
Comments.Text: Yeah, custom searches for contribs work mostly the same way (from memory - think you just copy a different file to get you started), ditto the doing things known as "search tasks" - I added a search task that duplicates selected payments with today's date (assists with entering payments given regularly).
Comments.UserDisplayName: artfulrobot
Tags: <contributions><custom-search>
Title: Creating a custom search to produce contributions as results
ThreadText: # Creating a custom search to produce contributions as results
  
  (Asked by: username_0 on 2015-03-24)
  
  I've followed the [documentation](http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Custom-Search+Extension) to create a custom search and I find this capability to be quite powerful for finding and displaying information about contacts.
  
  Now I would like to create a custom search to show a specific set of *contributions* and then (most importantly) allow me to perform actions on those specific contributions (e.g. "export contributions", "send thank-you letters").
  
  Is this possible? If so, how?
  
  **Tags:** contributions, custom-search
  
  > **Comments:**
  > **username_2**: Yeah, custom searches for contribs work mostly the same way (from memory - think you just copy a different file to get you started), ditto the doing things known as "search tasks" - I added a search task that duplicates selected payments with today's date (assists with entering payments given regularly).  
  > **username_1**: You may be interested by this post : https://civicrm.stackexchange.com/questions/25078/smart-group-features-extension-to-memberships-events-contributions-activities  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2015-03-24. Score: 5
  
  Start with the code for Find Contributions (<https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/SearchContribution.php>) and customize it as necessary to get the results you want, eg by hardcoding some values.
  
  Next, choose a task similar to what you want to do from the list at <https://github.com/civicrm/civicrm-core/tree/master/CRM/Contribute/Form/Task>, and copy and modify it as necessary. Next, after reviewing <https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Task.php>, find a hook like buildForm to modify the search form so it includes your new task(s).
  
  
  ---
  
  