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 skill object, storing the current values in the database.
Parameters
Parameter |
Type |
Description |
|---|---|---|
businessObject |
The applicant skill object that is being updated. |
|
context |
Specifies information about how the methodSpecifies 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 skill object with the specified applicant skill key. The example updates the value of the comments property. The UpdateApplicantSkill 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;
ApplicantSkill applicantSkill;
ApplicantKey applicantKey;
SkillKey skillKey;
ApplicantSkillKey applicantSkillKey;
Policy applicantSkillUpdatePolicy;
// 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 DynamicsGPService.CompanyKey();
companyKey.Id = (-1);
// Set up the context
context.OrganizationKey = (OrganizationKey)companyKey;
// Create an applicant key
applicantKey = new ApplicantKey();
applicantKey.Id = 1;
// Create a skill key
skillKey = new SkillKey();
skillKey.Id = "New test skill";
// Create an applicant skill key
applicantSkillKey = new ApplicantSkillKey();
applicantSkillKey.ApplicantKey = applicantKey;
applicantSkillKey.SkillKey = skillKey;
// Retrieve the specified applicant skill object
applicantSkill = wsDynamicsGP.GetApplicantSkillByKey(applicantSkillKey, context);
// Change the value of the comments property
applicantSkill.Comments = "Updated applicant skill";
// Get the update policy for applicant skill objects
applicantSkillUpdatePolicy = wsDynamicsGP.GetPolicyByOperation("UpdateApplicantskill", context);
// Update the applicant skill information
wsDynamicsGP.UpdateApplicantSkill(applicantSkill, context, applicantSkillUpdatePolicy);
}
}
}
** 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;
ApplicantSkill applicantSkill;
ApplicantKey applicantKey;
SkillKey skillKey;
ApplicantSkillKey applicantSkillKey;
Policy applicantSkillUpdatePolicy;
// 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 DynamicsGPService.CompanyKey();
companyKey.Id = (-1);
// Set up the context
context.OrganizationKey = (OrganizationKey)companyKey;
// Create an applicant key
applicantKey = new ApplicantKey();
applicantKey.Id = 1;
// Create a skill key
skillKey = new SkillKey();
skillKey.Id = "New test skill";
// Create an applicant skill key
applicantSkillKey = new ApplicantSkillKey();
applicantSkillKey.ApplicantKey = applicantKey;
applicantSkillKey.SkillKey = skillKey;
// Retrieve the specified applicant skill object
applicantSkill = wsDynamicsGP.GetApplicantSkillByKey(applicantSkillKey, context);
// Change the value of the comments property
applicantSkill.Comments = "Updated applicant skill";
// Get the update policy for applicant skill objects
applicantSkillUpdatePolicy = wsDynamicsGP.GetPolicyByOperation("UpdateApplicantskill", context);
// Update the applicant skill information
wsDynamicsGP.UpdateApplicantSkill(applicantSkill, context, applicantSkillUpdatePolicy);
// Close the service
if(wsDynamicsGP.State != CommunicationState.Faulted)
{
wsDynamicsGP.Close();
}
}
}
}