Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Delete from Database
meha
HI,
Through templating im adding records to database and generating html files. Now when a user deletes the html file using 'Delete' custom menu, the inserted record in the database must also get deleted.
Any suggesstions as to how this can be achieved.
Thanks & Regards,
Meha
Find more posts tagged with
Comments
Michael
Hi Meha
I assume you are using DataDeploy to insert the record in the database. Is it right to assume that you are getting DataDeploy to deploy the contents of your DCR? Is it possible to assume that if you delete the generated HTML file you also wish to delete the associated DCR? Do you automatically delete the DCR also as part of your custom menu item?
If so then you run DataDeploy against the deleted DCR and it should delete the record from the database.
Hope that helps.
Cheers
Michael
meha
Hi Micheal,
We are inserting the data from the dcr to the database in 2 different tables. One table data is used for the website and the other one is used for other applications like sms and email.So when i delete the html file from my teamsite, i will not be deleting the dcr. I have to delete record from only one table.
The delete menu item in teamsite is used by other branches and workareas.This functionality I need it only for one folder in a particular Branch.
Meha
Michael
Hi Meha
I am not sure I understand completely sorry. Is this what happens:
1. User creates a new DCR
2 User generates a new HTML file
3. When you publish you use OD/DD to copy your HTML file and deploy your DCR to two tables in the database
4. User deletes the HTML file
5 When you publish the deletion of the HTML file you want to update the database to remove the record from one of the tables?
Is this right? I assume that the user can only ever generate one HTML file - is that correct?
Cheers
Michael
Adam Stoller
To add to Michael's questions - are you using DAS or just iwdd.ipl within a DNR script for the OD deployment?
If the latter, you might be able to customize the script you're using for the DNR to verify whether the files being submitted are existing (in which case call iwdd.ipl as you currently do) or non-existing/deleted (in which case you might be able to call iwdd.ipl or perhaps just use Perl DBI code).
Alternatively, you could block out the standard OOTB Delete / Delete Record menu items and put in place you own custom menu item script that will take care of deleting the asset, submitting the deletion, deploying the deletion via OD and again - either using iwdd.ipl or, probably easier, Perl DBI code to delete the information from the intended DB.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com