Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Description
Updates the specified applicant interview object, storing the current values in the database.
Parameters
Parameter |
Type |
Description |
|---|---|---|
businessObject |
The applicant interview object that is being updated. |
|
context |
Specifies information about how the method will be called. |
|
policy |
Specifies the set of behaviors and behavior options to be applied during the operation. |
Interfaces
- Dynamics GP
- Human Resources/Payroll
Examples
The following C# example retrieves the applicant interview object with an applicant key value of "1" an iinterview type key of "test", and an apply date key equal to the current date. The example updates the value of the notes property. The UpdateApplicantInterview operation saves the change.
** 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;
ApplicantInterview applicantInterview;
ApplicantKey applicantKey;
InterviewTypeKey interviewTypeKey;
ApplyDateKey applyDateKey;
ApplicantInterviewTypeKey applicantInterviewTypeKey;
Policy applicantInterviewUpdatePolicy;
// 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 an interview type key
interviewTypeKey = new InterviewTypeKey();
interviewTypeKey.Id = "test";
// Create an apply date key
applyDateKey = new ApplyDateKey();
applyDateKey.Id = DateTime.Today;
// Create an applicant interview type key
applicantInterviewTypeKey = new ApplicantInterviewTypeKey();
applicantInterviewTypeKey.ApplicantKey = applicantKey;
applicantInterviewTypeKey.InterviewTypeKey = interviewTypeKey;
applicantInterviewTypeKey.ApplyDateKey = applyDateKey;
// Retrieve the applicant interview object
applicantInterview = wsDynamicsGP.GetApplicantInterviewByKey(applicantInterviewTypeKey, context);
// Update the applicant interview notes
applicantInterview.Notes = "Update applicant interview";
// Get the update policy for applicant interview objects
applicantInterviewUpdatePolicy = wsDynamicsGP.GetPolicyByOperation("UpdateApplicantInterview", context);
// Update the applicant interview object
wsDynamicsGP.UpdateApplicantInterview(applicantInterview, context, applicantInterviewUpdatePolicy);
}
}
}
** Native endpoint **
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using DynamicsGPWebServiceSample.DynamicsGPService;
namespace DynamicsGPWebServiceSample
{
class Program
{
static void Main(string[] args)
{
CompanyKey companyKey;
Context context;
ApplicantInterview applicantInterview;
ApplicantKey applicantKey;
InterviewTypeKey interviewTypeKey;
ApplyDateKey applyDateKey;
ApplicantInterviewTypeKey applicantInterviewTypeKey;
Policy applicantInterviewUpdatePolicy;
// 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 an interview type key
interviewTypeKey = new InterviewTypeKey();
interviewTypeKey.Id = "test";
// Create an apply date key
applyDateKey = new ApplyDateKey();
applyDateKey.Id = DateTime.Today;
// Create an applicant interview type key
applicantInterviewTypeKey = new ApplicantInterviewTypeKey();
applicantInterviewTypeKey.ApplicantKey = applicantKey;
applicantInterviewTypeKey.InterviewTypeKey = interviewTypeKey;
applicantInterviewTypeKey.ApplyDateKey = applyDateKey;
// Retrieve the applicant interview object
applicantInterview = wsDynamicsGP.GetApplicantInterviewByKey(applicantInterviewTypeKey, context);
// Update the applicant interview notes
applicantInterview.Notes = "Update applicant interview";
// Get the update policy for applicant interview objects
applicantInterviewUpdatePolicy = wsDynamicsGP.GetPolicyByOperation("UpdateApplicantInterview", context);
// Update the applicant interview object
wsDynamicsGP.UpdateApplicantInterview(applicantInterview, context, applicantInterviewUpdatePolicy);
// Close the service
if(wsDynamicsGP.State != CommunicationState.Faulted)
{
wsDynamicsGP.Close();
}
}
}
}