DeleteApplicantEducation


Description

Deletes applicant education information based on the key value supplied.

Parameters

Parameter

Type

Description

businessObjectKey

ApplicantSequenceKey

The applicant sequence key object that specifies the applicant education object to delete.

context

Context

Specifies information about how the method will be called.

policy

Policy

Specifies the set of behaviors and behavior options to be applied during the operation.


Interfaces

 

Examples

The following C# example deletes the applicant education object with a key that has an applicant key value of “1” and a sequence key value of “1”.

 Legacy endpoint

using System;
using System.Collections.Generic;
using System.Text;
using DynamicsGPWebServiceSample.DynamicsGPService;

namespace DynamicsGPWebServiceSample
{
	class Program
	{
		static void Main(string[] args)
		{
			CompanyKey companyKey;
			Context context;
			ApplicantKey applicantKey;
			SequenceKey sequenceKey;
			ApplicantSequenceKey applicantSequenceKey;
			Policy applicantEducationDeletePolicy;

			// 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);

			// Set up the context
			context.OrganizationKey = (OrganizationKey)companyKey;

			// Create an applicant key
			applicantKey = new ApplicantKey();
			applicantKey.Id = 1;

			// Create a sequence key
			sequenceKey = new SequenceKey();
			sequenceKey.Id = 1;

			// Create an applicant sequence key
			applicantSequenceKey = new ApplicantSequenceKey();
			applicantSequenceKey.ApplicantKey = applicantKey;
			applicantSequenceKey.SequenceKey = sequenceKey;

			// Get the delete policy for the applicant education objects
			applicantEducationDeletePolicy = wsDynamicsGP.GetPolicyByOperation(
				"DeleteApplicantEducation", context);

			// Delete the applicant education object
			wsDynamicsGP.DeleteApplicantEducation(applicantSequenceKey, 
				context, applicantEducationDeletePolicy);
	}
}
}

 Native endpoint

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DynamicsGPWebServiceSample.DynamicsGPService;

namespace DynamicsGPWebServiceSample
{
	class Program
	{
		static void Main(string[] args)
		{
			CompanyKey companyKey;
			Context context;
			ApplicantKey applicantKey;
			SequenceKey sequenceKey;
			ApplicantSequenceKey applicantSequenceKey;
			Policy applicantEducationDeletePolicy;

			// 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
			context.OrganizationKey = (OrganizationKey)companyKey;

			// Create an applicant key
			applicantKey = new ApplicantKey();
			applicantKey.Id = 1;

			// Create a sequence key
			sequenceKey = new SequenceKey();
			sequenceKey.Id = 1;

			// Create an applicant sequence key
			applicantSequenceKey = new ApplicantSequenceKey();
			applicantSequenceKey.ApplicantKey = applicantKey;
			applicantSequenceKey.SequenceKey = sequenceKey;

			// Get the delete policy for the applicant education objects
			applicantEducationDeletePolicy = wsDynamicsGP.GetPolicyByOperation(
				"DeleteApplicantEducation", context);

			// Delete the applicant education object
			wsDynamicsGP.DeleteApplicantEducation(applicantSequenceKey, 
				context, applicantEducationDeletePolicy);

			// Close the service
			if(wsDynamicsGP.State != CommunicationState.Faulted)
			{
				wsDynamicsGP.Close();
		}
	}
}
}


Documentation Feedback