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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • api function for retrieving custom data?
Pages: [1]

Author Topic: api function for retrieving custom data?  (Read 2561 times)

chrism

  • Guest
api function for retrieving custom data?
November 22, 2007, 10:33:19 am
I developed a customization to some forms which accessed values of some custom fields. I could not find an API that would retrieve a custom value so ended up using BAO, DAO functions. 

I may be missing something conceptually, but given this 'create' function exists:
crm_create_custom_value($entity_table, $entity_id, &$custom_field, &$data, $separator=NULL)

would it make sense to have a complementary 'get' function?
e.g. crm_get_custom_value($entity_table, $entity_id, &$custom_field, $separator=NULL)




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: api function for retrieving custom data?
November 22, 2007, 02:56:53 pm

yes, adding a getter makes sense for custom values. We plan to take a pretty comprehesive look and figure out a better, more coherent api strategy in a 2.x release. I dont think our current solution is great and we can and should do better

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • api function for retrieving custom data?

This forum was archived on 2017-11-26.