I have a written a plugin that is going to set a tv to a resource's event start date (a TV set by users) if it has one but if not set it to the published date.
I've got two problems that might be related.
The first is that I can use getTVValue to get my event start date but only if I use it's id rather than name. i.e.
This works
$evntStart = $resource->getTVValue(10);
But this doesn't
$evntStart = $resource->getTVValue('timelineStartDate');
The second issue is I can't seem to get publishedon. This is probably related as I'm also trying to get it by its name. I can live with using ids if anyone can tell me the id of publishedon.
This doesn't get anything...
$publishedon = $resource->getTVValue('publishedon');
I have the plugin set to OnDocFormSave.
Been banging my head against the wall with this so hope someone can help.