Retrieves a list of posted payables vendor payment summary objects that match the specified criteria.
Parameter |
Type |
Description |
---|---|---|
criteria |
A posted payables vendor payment criteria object that specifies which posted payables vendor payment summary objects to return. |
|
context |
Specifies information about how the method will be called. |
Value |
Type |
Description |
---|---|---|
GetPostedPayablesVendorPaymentsListResult |
The list of posted payables vendor payment summary objects that match the specified criteria. |
The following C# example retrieves the list of posted payables vendor payment summary objects with a vendor Id of “ASSOCIAT0001”. A message box displays the number of posted payables vendor payment summary objects assocated with the vendor.
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; PostedPayablesVendorPaymentSummary[] postedPayablesVendorPaymentList; PostedPayablesVendorPaymentCriteria postedPayablesVendorPaymentCriteria; LikeRestrictionOfString vendorIdRestriction; // Create an instance of the service DynamicsGP wsDynamicsGP = new DynamicsGP(); // Be sure that 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 posted payables vendor payment criteria object vendorIdRestriction = new LikeRestrictionOfString(); vendorIdRestriction.Like = "ASSOCIAT0001"; postedPayablesVendorPaymentCriteria = new PostedPayablesVendorPaymentCriteria(); postedPayablesVendorPaymentCriteria.VendorId = vendorIdRestriction; // Get the list of posted payables vendor payment summary objects postedPayablesVendorPaymentList = wsDynamicsGP.GetPostedPayablesVendorPaymentsList( postedPayablesVendorPaymentCriteria, context); // Display the number of posted payables vendor payment summary objects for the specified vendor MessageBox.Show("Total number of posted payables vendor payments: " + postedPayablesVendorPaymentList.Length.ToString()); } } }
Native endpoint
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using DynamicsGPWebServiceSample.DynamicsGPService; namespace DynamicsGPWebServiceSample { class Program { static void Main(string[] args) { CompanyKey companyKey; Context context; PostedPayablesVendorPaymentSummary[] postedPayablesVendorPaymentList; PostedPayablesVendorPaymentCriteria postedPayablesVendorPaymentCriteria; LikeRestrictionOfstring vendorIdRestriction; // 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 the posted payables vendor payment criteria object vendorIdRestriction = new LikeRestrictionOfstring(); vendorIdRestriction.Like = "ASSOCIAT0001"; postedPayablesVendorPaymentCriteria = new PostedPayablesVendorPaymentCriteria(); postedPayablesVendorPaymentCriteria.VendorId = vendorIdRestriction; // Get the list of posted payables vendor payment summary objects postedPayablesVendorPaymentList = wsDynamicsGP.GetPostedPayablesVendorPaymentsList( postedPayablesVendorPaymentCriteria, context); // Display the number of posted payables vendor payment summary objects for the specified vendor MessageBox.Show("Total number of posted payables vendor payments: " + postedPayablesVendorPaymentList.Length.ToString()); // Close the service if(wsDynamicsGP.State != CommunicationState.Faulted) { wsDynamicsGP.Close(); } } } }