2

One can enter notes with a new contribution and they show up like this:

Campaign Middleport Pottery, Steam Engine

Receipt Sent April 10th, 2015 10:56 AM

Note Where is the note field?

Transaction ID 101010

And are in the template like this:

{if $receipt_date}          
  <tr>          
            <td class="label">{ts}Receipt Sent{/ts}</td>
            <td>{$receipt_date|crmDate}</td>
    </tr>          
  {/if}

{foreach from=$note item="rec"}          
  {if $rec }          
    <tr>          
      <td class="label">{ts}Note{/ts}</td>       
      <td>{$rec}</td>             //LINE IN QUESTION!
    </tr>          
  {/if}          
{/foreach}


  {if $trxn_id}          
    <tr>          
      <td class="label">{ts}Transaction ID{/ts}</td>          
      <td>{$trxn_id}</td>          
    </tr>          
  {/if}

However it seems I can not export the data in this field from the user interface and I can not seem to find it in the database to create a query. Any idea on table and field?

Thank you!

6

civicrm_note

entity_table = 'civicrm_contribution'

entity_id = contributionID

6

You can retrieve contribution notes via the api using:

civicrm_api3('Note', 'get', array(
  'entity_table' => 'civicrm_contribution',
  'entity_id' => $contributionID,
));

Or see the api explorer to generate this in other formats (you can also do it from within a smarty template, for example).

Important: The api returns raw, unsanitized user input. If you are displaying this value, be sure to sanitize the output using htmlspecialchars or similar.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.