Question

I am working with WSS 3.0 and trying to set some permissions with the ItemAdded-Event. The problem is, that the event dont fire if I add an item. I've searched the whole web and found nothing. It is only on ItemAdding / ItemAdded, yet I have already implemented a ItemUpdating and ItemDeleting Event which are working perfect! Are there known issues?

This is my Event (It not even get my debugmessages.. :( ):

      public override void ItemAdded(SPItemEventProperties properties)
      {
        Debug.WriteLine("ItemAdded started.");
        PMDB_ContentType_Class pmClass = new PMDB_ContentType_Class();

        pmClass.SetPermissions(properties);


        Debug.WriteLine("ItemAdded ended.");
      }

This is the feature.xml

<?xml version="1.0" encoding="utf-8"?>
<Feature Id="34e2c6bd-0e9f-4a65-b280-3cd4c5ff5cb4" Title="PMDB_ContentType"           
Scope="Site" Version="1.0.0.0" Hidden="FALSE" DefaultResourceFile="core" 
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="PMDB_ContentType\PMDB_ContentType.xml" />
</ElementManifests>
</Feature>
Was it helpful?

Solution

1 >> I hope that you have attached you event with your list properly in FeatureActivated Event receiver of Feature. I cannot check that because you haven't post that code. please check if there are any errors in that code.

2 >> Use Sharepoint Manager (http://spm.codeplex.com/releases/view/51438) to see if your event is properly attached to your list or not. if not then try to deactivate feature from web UI and reactivate it again.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top