CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Search profile created date and modified date
Pages: [1]

Author Topic: Search profile created date and modified date  (Read 353 times)

rulley

  • I’m new here
  • *
  • Posts: 13
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal
  • MySQL version: 5.5.25
  • PHP version: 5.4.4
Search profile created date and modified date
February 06, 2014, 05:41:23 pm
really need these as search result columns. they aren't available as fields when creating a custom search profile... any ideas how to get them added????

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Search profile created date and modified date
February 06, 2014, 06:17:48 pm

You'll need to make a modification to core (i suspect the xml files) to get these exposed

i suspect making the fields importable / exportable (and then runnin gencode) might do the needful

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

rulley

  • I’m new here
  • *
  • Posts: 13
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal
  • MySQL version: 5.5.25
  • PHP version: 5.4.4
Re: Search profile created date and modified date
February 07, 2014, 01:05:09 am
ok thx.. also tried to create a couple of custom date fields and now trying to populate those fields with a hook (from example code) .. can't seem to get it working.. any ideas

function defaultdates_civicrm_pre ($op, $objectName, $objectId, &$objectRef) {
  $custom_fields = array('foo' => 'custom_31', 'bar' => 'custom_32');
$dt = gmdate("Y-m-d H:i:s", time());
echo "testing";
  if ($objectName == "Individual" && $op == "edit") {
   

  $contact_id = $objectId;
  require_once 'CRM/Core/BAO/CustomValueTable.php';
  $my_foo = $dt;
  $my_bar = $dt;
  $set_params = array('entityID' => $contact_id,
    $custom_fields['foo'] => $my_foo, $custom_fields['bar'] => $my_bar);
  CRM_Core_BAO_CustomValueTable::setValues($set_params);
    }
}

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Search profile created date and modified date

This forum was archived on 2017-11-26.