Whenever custom data is written to the database you can use the module_custom() hook to determine what most of the parameters written were. However, I've been unable to find the 'id' of the write.
For example lets examine Custom Group Athlete
Athlete
Field 1 Label: SportPlayed
Field 1 Type: AlphaNumeric
Field 2 Label: DateStarted
Field 2 Type: Date
Field 3 Label: Enjoyment Level
Field 3 Type: Alphanumeric
Field 4 Label: Updated
Field 4 Type: Date
Now,
Lets ignore any calls that this Custom Group should really be an activity.
Lets assume there are no checks on uniqueness of data answered.
Using the $params variable from the custom() hook I can see the particulars about every field that was writen EXCEPT the ID of the entry(Not the entity ID).
Therefore, if I had The following Data
Sport Played | Date Started | Enjoyment Level | Updated
-------------------------------------------------------
Baseball | 1-1-2012 | High |
Baseball | 1-1-2012 | Low |
and I changed the first entries Enjoyment Level from High to Low, how could I also change the Updated entry to today's date? Remember that, as I understand, I don't actually know which entries are changing values from the $param field. All I know are the values submitted. I need some way find the id of the entry which is oddly not included in the $param variable Does anyone have a way to do this? I understand that if values are roughly unique I could run an SQL query to search for all matching parameters and return the ID but that seems overly complicated.