Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Description
Retrieves a list of sales process hold setup objects that match the specified criteria.
Parameters
Parameter |
Type |
Description |
|---|---|---|
criteria |
A sales process hold setup criteria object that specifies which sales process hold setup objects are returned. |
|
context |
Specifies information about how the method will be called. |
Return Value:
Value |
Type |
Description |
|---|---|---|
GetSalesProcessHoldSetupListResult |
The list of sales process hold setup objects that match the specified criteria. |
Interfaces
- Dynamics GP
- Sales
Examples
The following C# example retrieves the list of sales process hold setup objects where the Id value begins with "A". The Description property from each sales process hold setup object is displayed in a message box.
** Legacy endpoint**
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using DynamicsGPWebServiceSample.DynamicsGPService;
namespace DynamicsGPWebServiceSample
{
class Program
{
static void Main(string[] args)
{
CompanyKey companyKey;
Context context;
LikeRestrictionOfString idRestriction;
SalesProcessHoldSetupCriteria salesProcessHoldSetupCriteria;
SalesProcessHoldSetup[] salesProcessHoldSetupList;
// Create an instance of the service
DynamicsGP wsDynamicsGP = new DynamicsGP();
// Be sure the default credentials are used
wsDynamicsGP.UseDefaultCredentials = true;
// Create a context with which to call the service
context = new Context();
// Specify which company to use (sample company)
companyKey = new CompanyKey();
companyKey.Id = (-1);
// Set up the context object
context.OrganizationKey = (OrganizationKey)companyKey;
// Create a string restriction object
// Retrieve all sales process setup holds with a name beginning with 'A'
idRestriction = new LikeRestrictionOfString();
idRestriction.Like = "A%";
// Create a criteria object
salesProcessHoldSetupCriteria = new SalesProcessHoldSetupCriteria();
salesProcessHoldSetupCriteria.Id = idRestriction;
// Retrieve the sales process hold setup objects specified by the criteria object
salesProcessHoldSetupList = wsDynamicsGP.GetSalesProcessHoldSetupList(
salesProcessHoldSetupCriteria, context);
// Display the description of each member of the sales process hold setup object list
StringBuilder summaryList = new StringBuilder();
foreach (SalesProcessHoldSetup a in salesProcessHoldSetupList)
{
summaryList.AppendLine("Description: " + a.Description);
}
MessageBox.Show(summaryList.ToString());
}
}
}
** Native endpoint **
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Windows.Forms;
using DynamicsGPWebServiceSample.DynamicsGPService;
namespace DynamicsGPWebServiceSample
{
class Program
{
static void Main(string[] args)
{
CompanyKey companyKey;
Context context;
LikeRestrictionOfstring idRestriction;
SalesProcessHoldSetupCriteria salesProcessHoldSetupCriteria;
SalesProcessHoldSetup[] salesProcessHoldSetupList;
// Create an instance of the service
DynamicsGPClient wsDynamicsGP = new DynamicsGPClient();
// Create a context with which to call the service
context = new Context();
// Specify which company to use (sample company)
companyKey = new CompanyKey();
companyKey.Id = (-1);
// Set up the context object
context.OrganizationKey = (OrganizationKey)companyKey;
// Create a string restriction object
// Retrieve all sales process setup holds with a name beginning with 'A'
idRestriction = new LikeRestrictionOfstring();
idRestriction.Like = "A%";
// Create a criteria object
salesProcessHoldSetupCriteria = new SalesProcessHoldSetupCriteria();
salesProcessHoldSetupCriteria.Id = idRestriction;
// Retrieve the sales process hold setup objects specified by the criteria object
salesProcessHoldSetupList = wsDynamicsGP.GetSalesProcessHoldSetupList(
salesProcessHoldSetupCriteria, context);
// Display the description of each member of the sales process hold setup object list
StringBuilder summaryList = new StringBuilder();
foreach (SalesProcessHoldSetup a in salesProcessHoldSetupList)
{
summaryList.AppendLine("Description: " + a.Description);
}
MessageBox.Show(summaryList.ToString());
// Close the service
if(wsDynamicsGP.State != CommunicationState.Faulted)
{
wsDynamicsGP.Close();
}
}
}
}