Forums

delete action

mic0672 17 Nov, 2014
Hi,
Do I need to remove a file when you remove a record .
I entered the delete action linked to a form that deletes the file , I set the permissions , but it does not work : the action deletes the records but does not load form. Also, when I created the action , it displays two delete action in permissions form.
thanks
mike
GreyHead 19 Nov, 2014
Hi Mike,

As far as I know the CC Delete action will only delete the specified record from the database. It doesn't know anything about the related file and will ignore it.

You can set up a custom delete for that does both if you need that; or you could set up a little housekeeping form running on a cron job say once a day that checks for files that aren't in any record in the database and deletes them.

Bob
mic0672 19 Nov, 2014
Thanks Bob , how do I set a custom delete?
GreyHead 19 Nov, 2014
Hi Mike,

Have CC link to a ChronoForm instead of using the default delete option. Include a record identifier in the form link.

In the form have the On Load event check that the record exists and ask the user to confirm the deletion. With the code that checks for the record get any file name(s) saved there and add them to the form data.

In the on Submit event use Custom Code actions to (a) delete the record and (b) delete the file(s). Then return the user to the CC listing.

Bob
This topic is locked and no more replies can be posted.