GetResults Method

The GetResults method gets subscription and subscription notification information for a user.

Syntax
Function GetResults( _
  bstrUser As String, _) As String[C++]
HRESULT GetResults(
  BSTR bstrUser,
  BSTR* pbstrXMLResults);
Parameters

[Visual Basic]

  • bstrUser
    String that contains the user whose subscriptions notifications will be retrieved. The user name must be qualified by the domain the user belongs to, for example, "Domain\User". If an empty string is passed in, the current user credentials will be used.
Return Values
  • pbstrXMLResults
    String that contains the XML results for one user. The fields present in the output are determined by the content class of the item to which the subscription refers. Flags in the output indicate whether the notification has been sent.
Error Values

For a list of errors returned by SharePoint Portal Server subscription management objects, see Error Messages.

[C++]

  • bstrUser
    [in] BSTR that contains the user whose subscriptions notifications will be retrieved. The domain the user belongs to, for example, "Domain\User" must qualify the user name. If an empty string is passed in, the current user credentials will be used.
  • pbstrXMLResults
    [out, retval] BSTR that contains the XML results for one user. The content class of the item to which the subscription refers determines the fields present in the output. Flags in the output indicate if the notification has been sent.
Return Values

For a list of errors returned by SharePoint Portal Server subscription management objects, see Error Messages.

Remarks

If a coordinator for the workspace calls the GetResults method and passes a different user name than their own, the results will contain subscription information for that user, but no subscription notification information. If user calls this method on their own user name, the results will include both subscriptions and subscription notification information. Users without Coordinator privileges cannot retrieve results for other users.

Call the SetRequestUrl method before the GetResults method if you want the subscription URLs to be rendered by using the FQDN of the server. If SetRequestUrl is not called, the URLs will be rendered by using the NetBIOS name of the server.

Example

The following code example in Microsoft Visual BasicĀ® demonstrates how to get subscription and subscription notification results for a workspace.

Dim oSubMgr
Set oSubMgr= CreateObject("PKM.SubscriptionManager")

Dim strWorkspace
strWorkspace = "MyWorkspace"

Dim oResMgr
Set oResMgr= oSubMgr.GetResultManager(strWorkspace)

Dim strXMLResults
strXMLResults = oResMgr.GetResults("")