Modify an object

Hi there,

I've an object with the filed "hasDownloaded" who is a int.
The object:

I need to modify this field without using /manage_propertiesForm ( by code) when someone load this object view, on other word I need to increment the int "hasDownloaded" each time the trialdownload_view is "loaded".


So you have a custom content type called "TrialDownload"

You could create a custom browser view and associated it with the "TrialDownload" content type. It would write to the hasDownloaded field whenever it is called.

You may run into CSRF issues with plone.protect. If you do, this article will help you

I'm not sure if this is the ideal solution but it should work.

Are you sure you need to do it that way ?
I am thinking: the 'normal file' download is actually a (browser) view. You could maybe override this for your content type and do the counting in the view, and 'save 'the results' from there
I dont think you need a field, especially if there is just one download you want to track.

Just for information: a 'normal' download link should be something like http://site/path/to/file/@@download


Its a view with 2 buttons, they only download the file if they click into the button and I need to count it.