Event receiver is working fine for all custom lists in development environment.
Issue: When i deploy the same event receiver solution file in production server, it is not firing.
Perform below powershell script
$spWeb = Get-SPWeb -Identity "http://npduat:7001/"
$spList = $spWeb.Lists["DocumentTrackingEmailNotification"]
$spEventReceiver = $spList.EventReceivers.Add()
$spEventReceiver.Assembly = "BFL.PPAP.Webparts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=56fcab577ff38308"
$spEventReceiver.Class = "BFL.PPAP.Webparts.EventReceivers.DocumentTrackingEmailNotificationReceiver.DocumentTrackingEmailNotificationReceiver"
$spEventReceiver.Name = "DocumentTrackingEmailNotificationReceiverItemAdded"
$spEventReceiver.Type = "ItemAdded"
$spEventReceiver.SequenceNumber = 1000
$spEventReceiver.Synchronization = 1
$spEventReceiver.Update()
Refer link
No comments:
Post a Comment