This method deletes a specific workflow notification, based on its key.
Parameter |
Type |
Description |
---|---|---|
key |
The notification key that uniquely identifies the notification. |
The following C# example deletes a specific workflow notification, based on its key value (a GUID). The GUID value typically would have been stored in some external location, such as a database.
Be sure to use the URL and port for your workflow server. |
using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using Microsoft.Dynamics.Workflow.Proxy; namespace WorkflowWebServiceSample { class Program { static void Main(string[] args) { NotificationKey notificationKey; Guid keyValue; // Create an instance of the web service DynamicsWorkflow wsWorkflow = new DynamicsWorkflow(); // Specify the URL used to access the Workflow web service wsWorkflow.Url = "http://WorkflowServer:10072/_vti_bin/WorkflowService.asmx"; // Be sure that default credentials are being used wsWorkflow.UseDefaultCredentials = true; notificationKey = new NotificationKey(); keyValue = new Guid("d011fbb7-02b4-4bf1-b5ad-709843063ac5"); notificationKey.Id = keyValue; // Delete the notification wsWorkflow.DeleteNotification(notificationKey); } } }