Retrieves a list of applicant education objects that match the specified criteria.
Parameter |
Type |
Description |
---|---|---|
criteria |
The applicant eduction criteria object that specifies which applicant eduction objects are returned. |
|
context |
Specifies information about how the method will be called. |
Value |
Type |
Description |
---|---|---|
GetApplicantEducationListResult |
The list of applicant education objects that match the specified criteria. |
The following C# example retrieves the list of applicant education objects with a School property of “Local University”. The total number of applicant education objects 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; ApplicantEducation[] applicantEducation; ApplicantEducationCriteria applicantCriteria; LikeRestrictionOfString schoolRestriction; // Create an instance of the service DynamicsGP wsDynamicsGP = new DynamicsGP(); // Be sure that default credentials are being 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); // Specify the criteria of the applicant education objects to retrieve schoolRestriction = new LikeRestrictionOfString(); schoolRestriction.Like = "Local University"; applicantCriteria = new ApplicantEducationCriteria(); applicantCriteria.School = schoolRestriction; // Retrieve the list of applicant education objects applicantEducation = wsDynamicsGP.GetApplicantEducationList(applicantCriteria, context); // Display the number of applicant education objects matching the criteria MessageBox.Show("Total applicants educated at a local university:" + applicantEducation.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; ApplicantEducation[] applicantEducation; ApplicantEducationCriteria applicantCriteria; LikeRestrictionOfstring schoolRestriction; // 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); // Specify the criteria of the applicant education objects to retrieve schoolRestriction = new LikeRestrictionOfstring(); schoolRestriction.Like = "Local University"; applicantCriteria = new ApplicantEducationCriteria(); applicantCriteria.School = schoolRestriction; // Retrieve the list of applicant education objects applicantEducation = wsDynamicsGP.GetApplicantEducationList(applicantCriteria, context); // Display the number of applicant education objects matching the criteria MessageBox.Show("Total applicants educated at a local university:" + applicantEducation.Length.ToString()); // Close the service if(wsDynamicsGP.State != CommunicationState.Faulted) { wsDynamicsGP.Close(); } } } }