This method will find out whether workflow notifications are to be displayed in the Microsoft Dynamics GP client.
Parameter |
Type |
Description |
---|---|---|
organizationKey |
Specifies the unique identifier of the company for which notifications are being examined. |
Value |
Type |
Description |
---|---|---|
AreDesktopAlertsOnResult |
The status of the workflow notifications. The value true indicates notifications are shown, while false indicates they are not. |
The following C# example retrieves the workflow notification status for the sample company and writes the result to the console window.
Be sure to use the URL and port for your workflow server. |
using System; using System.Collections.Generic; using System.Text; using Microsoft.Dynamics.Workflow.Proxy; namespace WorkflowWebServiceSample { class Program { static void Main(string[] args) { CompanyKey companyKey; bool notifications; bool leadWorkflowEnabled; // 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; // Are desktop notifications on? companyKey = new CompanyKey(); companyKey.Id = (-1); notifications = wsWorkflow.AreDesktopAlertsOn(companyKey); if (notifications = true) { Console.Write("Notifications are On"); } else { Console.Write("Notifications are Off"); } Console.ReadLine(); } } }