Quantcast
Channel: The SharePoint Farm
Viewing all articles
Browse latest Browse all 184

Creating Search Alerts in SharePoint 2013

$
0
0

Creating Search Alerts in SharePoint 2013 is a tad different than it was in SharePoint 2010. SharePoint 2010 had a SearchAlert class which allowed you to easily create the alerts. This class had a single dependency on the Web Application using it; there had to be a Search Service Application Proxy attached to the Web Application. In SharePoint 2013, it is slightly different. The SearchAlert class’ constructor has been marked internal, and although you can access the constructor of the SearchAlert class via reflection, using reflection is unsupported. The workaround is fairly simple, but it now has a dependency on the Web Application having a User Profile Service Application Proxy. Without the UPSA proxy, creating the alert will fail. Otherwise, this code is mostly gleamed from reflection. [crayon-54cc907099634107099767/] The keys here are setting the AlertTemplate to “OSS.Search” and setting MatchId to Guid.Empty.

The post Creating Search Alerts in SharePoint 2013 appeared first on Nauplius.


Viewing all articles
Browse latest Browse all 184

Latest Images

Trending Articles





Latest Images