Return Value:

The list of pricing summary objects that match
the specified criteria.

Interfaces

Dynamics GP

Inventory

Examples

The following C# example retrieves the list of
pricing summary objects where the PriceLevelId property equals
“Retail”. A message box displays the total number of pricing
summary objects with the specified PriceLevelId.

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 priceLevelIdRestriction;
PricingCriteria pricingCriteria;
PricingSummary[] pricingSummaries;
// 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 the restriction object
// Get the items with a price level Id of 'Retail'
priceLevelIdRestriction = new LikeRestrictionOfString();
priceLevelIdRestriction.EqualValue = "Retail";
// Create a pricing criteria object
pricingCriteria = new PricingCriteria();
pricingCriteria.PriceLevelId = priceLevelIdRestriction;
// Retrieve the list of pricing summary objects
pricingSummaries = wsDynamicsGP.GetPricingList(pricingCriteria, context);
// Display the total number of items with a price level Id of 'Retail'
MessageBox.Show("Total number of retail priced items: " + pricingSummaries.Length.ToString());
}
}
}