Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0In my Module where  to  write Delete FunctionIn my Module where to write Delete Function
Previous
 
Next
New Post
11/14/2008 7:26 AM
 

We are using Dnn 4.8.4 version . I added one  Dynamic Module  and  respective tables for that Module ( Ex : in table ModuleSettings) .  When I  Delete the Module From UI ( not from EditModule --> DeleteClick but  through Module UI where u can find Edit,Print,Settings,Delete,Move,..)   , the module was deleted . I  want the data respective to the Module ID ( Ex : in table ModuleSettings)  also to be deleted . So we have written Delete Procedure . But I dont know where to call the Delete SP .

Thank to all for ur help

Arvind

 

 

 

 

 

 
New Post
11/14/2008 1:34 PM
 

Module instance deletion is handled entirely by the DNN core. The core deletion method (unfortunately IMHO) does not raise an event or perform any callback into your module code so there is no way to call your delete proceedure. In most cases, the exposing of a delete module event or callback is unnecessary. Removal of records from the ModuleSettings table should occur automatically without any work on your part as there is a foreign key relationship (with a cascade delete rule) between the DNN Modules and ModuleSettings table. For other custom tables created by your module you will need to include a ModuleID column which will need to be set to the ModuleId whenever a row is added to the table. You will also need to define a foreign key relationship between the ModuleID column of your custom table and the ModuleID column of the DNN Modules table and set its delete rule to "Cascade".

In the above, I said that I thought it unfortunate that the core deletion method does not expose an event or callback into your module code when a module is deleted. In many modules I have written, I have created one or more folders in the Portal root for storing files - templates, generated xml report definitions, user uploaded images/files, etc. and have yet to find a good way to delete these files/folders when the module instance is deleted.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
11/17/2008 1:46 AM
 

Thanks William ,

  I got your idea . While  creating relation ship between custum tables and  Dnn Modules table for ModuleID , checking cascade delete option will delete automatically when ever Dnn Modules row is deleted . My custum tables row corresponding to the moduleID also deleted .

Issue was

But  when ever I delete the module from UI , In Dnn Modules table corresponding row is updated  ( IsDeleted colunm of that row becomes 1 )  not deleted . so in this case what to do

 

thanks to all for ur help

Arvind

 

 

 
New Post
11/17/2008 8:43 AM
 

This is normal behavior since a module entry is not deleted from the Modules table (and from other tables related by the ModuleId) until it is deleted from the Recycle Bin by the site administrator. Instead, the IsDeleted column of the entry is marked as 1 (true). Sorry I forgot to mention that.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0In my Module where  to  write Delete FunctionIn my Module where to write Delete Function


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out