SharePoint 2010 / MSOCAF - Call to Microsoft.SharePoint.SPItemEventProperties.OpenWeb() on Sharepoint 2010. Use Microsoft.SharePoint.SPItemEventProperties.get_Web Property instead.
If you are using the following code:
and are getting the following error:
Call to Microsoft.SharePoint.SPItemEventProperties.OpenWeb() on Sharepoint 2010. Use Microsoft.SharePoint.SPItemEventProperties.get_Web Property instead.
You will need to update the code to the following, and it should remedy the error:
1 | SPWeb web = properties.OpenWeb(); |
Call to Microsoft.SharePoint.SPItemEventProperties.OpenWeb() on Sharepoint 2010. Use Microsoft.SharePoint.SPItemEventProperties.get_Web Property instead.
You will need to update the code to the following, and it should remedy the error:
1 | SPWeb web = properties.Web; |
Comments