Human Capital Management Apex API Developer Reference

vanahcm.CommonService

global with sharing class CommonService

Represents a Common service structure

vanahcm.CommonService.ServiceException

global class ServiceException extends Exception

Exception class for exceptions that can be thrown by service

vanahcm.CommonService.CustomField

global class CustomField

Represents a custom field

Properties

Name Type Description
FieldName String API name of the field. If field is part of a managed package, field name includes namespace prefix.
Value String Value of the field

Methods

CustomField

global CustomField()

Creates a new instance of CustomField

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.CustomField field = new vanahcm.CommonService.CustomField();

CustomField

global CustomField(String fieldName, String value)

Creates a new instance of the CustomField class using values passed in parameters

Input Parameters

Name Type Description
fieldName String API name of the field. If field is part of a managed package, field name includes namespace prefix.
value String Value of the field

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.CustomField field = new vanahcm.CommonService.CustomField(vanahcm__Candidate__c.vanahcm__Resume__c.getDescribe().getName(), 'Sample Resume');

vanahcm.CommonService.CommonObject

global abstract class CommonObject

Represents a common object class

Properties

Name Type Description
Id ID ID
CreatedDate DateTime Created date
LastModifiedDate DateTime Last modified date
CreatedById ID Created by ID
LastModifiedById ID Last Modified by ID
CustomFields List<vanahcm.CommonService.CustomField> List of CustomField

vanahcm.CommonService.LearningCourse

global class LearningCourse extends CommonObject

Represents a learning course

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
Name String Name
CompletionDate Date Completion Date
Description String Description
DevelopmentPlan ID Development Plan
ExternalLearningCost Decimal External Learning Cost
ExternalLearningCourse String External Learning Course
LearningCatalog ID Learning Catalog ID
LearningCatalogType String Learning Catalog Type
LearningUrl String Learning URL
PassFail String Pass/Fail
Score Decimal Score
StartDate Date Start Date
Status String Status
User String User
Worker ID Worker
OwnerId ID Owner ID

Methods

LearningCourse

global LearningCourse()

Creates a new instance of the Learning Course

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.LearningCourse learningCourse = new vanahcm.CommonService.LearningCourse();

vanahcm.CommonService.LearningCatalog

global class LearningCatalog extends CommonObject

Represents a learning catalog

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
Name String Name
EndDate Date End Date
EndTime String End Time
ExternalCost Decimal External Cost
Facility String Facility
Fri Boolean Friday
Instructor ID Instructor
InternalCost Decimal Internal Cost
LearningType ID Learning Type
MaximumEnrollment Decimal Maximum Enrollment
MinimumEnrollment Decimal Minimum Enrollment
Mon Boolean Monday
Room String Room
Sat Boolean Saturday
StartDate Date Start Date
StartTime String Start Time
Sun Boolean Sunday
Thur Boolean Thursday
Tues Boolean Tuesday
URL String URL
Vendor String Vendor
VendorLocation String Vendor Location
Wed Boolean Wednesday
OwnerId ID Owner ID
Description String Description

Methods

LearningCatalog

global LearningCatalog()

Creates a new instance of the Learning Catalog

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.LearningCatalog catalog = new vanahcm.CommonService.LearningCatalog();

vanahcm.CommonService.LearningType

global class LearningType extends CommonObject

Represents a learning type, including their learning catalog

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
Name String Name
OwnerId ID Owner ID
LearningCatalogs List<vanahcm.CommonService.LearningCatalog> List of LearningCatalog

Methods

LearningType

global LearningType()

Creates a new instance of the LearningType

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.LearningType learningType = new vanahcm.CommonService.LearningType();

vanahcm.CommonService.Worker

global class Worker extends CommonObject

Represents a worker

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
FirstName String First Name
LastName String Last Name
Middle String Middle Name
Prefix String Prefix
FormerName String Former Name
Nickname String Nick Name
PersonalEmail String Personal Email
WorkEmail String Work Email
EffectiveDate Date Effective Date
UserID ID User Id
WorkerID Integer Worker Id
ExternalWorkerID String External Worker Id
HireDate Date Hire Date
SeniorityDate Date Seniority Date
Gender String Gender
Country ID Country
Ethnicity String Ethnicity
BirthCountry ID Birth Country
DateOfBirth Date Date Of Birth
MaritalStatus String Marital Status
HireReason ID Hire Reason
BenefitProgram ID Benefit Program
BudgetOwner ID Budget Owner
PeopleManager Boolean People Manager
BenefitEligible String Benefit Eligible
WorkerCompCode ID Worker Compensation Code
EligibleForEEOReporting Boolean Eligible For EEO Reporting
I9Status String I9 Status
USWorkEligibility String US Work Eligibility
EEOClass String EEO Class
MilitaryStatus String Military Status
FLSAStatus String FLSA Status
DisabledVeteran Boolean Disabled Veteran
VietnamVeteran Boolean Vietnam Veteran
W4Status String W4 Status
Phone vanahcm.CommonService.Phone Phone
WorkAssignment vanahcm.CommonService.WorkAssignment Work Assignment
Compensation vanahcm.CommonService.Compensation Compensation
NationalID vanahcm.CommonService.NationalID National ID
Address vanahcm.CommonService.Address Address
EquityPlan vanahcm.CommonService.EquityPlan Equity Plan
User User User

Methods

Worker

global Worker()

Creates a new instance of the Worker

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.Worker worker = new vanahcm.CommonService.Worker();

vanahcm.CommonService.Phone

global class Phone extends CommonObject

Represents a worker's phone

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
PhoneType String Phone Type
PhoneNumber String Phone Number
Extension String Extension

Methods

Phone

global Phone()

Creates a new instance of the Phone

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.Phone phone = new vanahcm.CommonService.Phone();

vanahcm.CommonService.WorkAssignment

global class WorkAssignment extends CommonObject

Represents a worker's work assignment

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
WorkerEvent ID Worker Event
EffectiveDate Date Effective Date
WorkerType String Worker Type
AssignmentIndicator String Assignment Indicator
Position ID Position
AssignmentNumber String Assignment Number
BusinessTitle String Business Title
PositionStartDate Date Position Start Date
Job ID Job
StandardDailyHours Decimal Standard Daily Hours
ScheduledHours Decimal Scheduled Hours
FullPartTime String Full\Part Time
RegularTemporary String Regular\Temporary
SalariedHourly String Salaried\Hourly
FTE Decimal FTE
Shift ID Shift
Organization ID Organization
Country ID Country
Division ID Division
Department ID Department
Location ID Location
CostCenter ID Cost Center
Manager ID Manager
PayGroup ID Pay Group
PayrollStatus String Payroll Status
UnionCode ID Union Code

Methods

WorkAssignment

global WorkAssignment()

Creates a new instance of the WorkAssignment

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.WorkAssignment workAssignment = new vanahcm.CommonService.WorkAssignment();

vanahcm.CommonService.Compensation

global class Compensation extends CommonObject

Represents a worker's compensation

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
CompensationEvent ID Compensation Event
CompensationPlan ID Compensation Plan
CompensationGrade ID Compensation Grade
PayGroup ID Pay Group
CompensationRate Decimal Compensation Rate
CompensationFrequency ID Compensation Frequency
CostCenter ID Cost Center

Methods

Compensation

global Compensation()

Creates a new instance of the Compensation

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.Compensation compensation = new vanahcm.CommonService.Compensation();

vanahcm.CommonService.NationalID

global class NationalID extends CommonObject

Represents a worker's national ID

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
CountryCode ID Country Code
NationalIdType ID National ID Type
NationalId String National ID

Methods

NationalID

global NationalID()

Creates a new instance of the NationalID

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.NationalID nationalId = new vanahcm.CommonService.NationalID();

vanahcm.CommonService.Address

global class Address extends CommonObject

Represents a worker's address

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
CountryCode ID Country Code
AddressType String Address Type
AddressLine1 String Address Line 1
AddressLine2 String Address Line 2
AddressLine3 String Address Line 3
AddressLine4 String Address Line 4
AddressLine5 String Address Line 5
CityTown String City Town
Region String Region
StateProvinceID ID State\Province Id
StateProvince String State Province
ZipPostalCode String Zip Postal Code

Methods

Address

global Address()

Creates a new instance of the Address

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.Address address = new vanahcm.CommonService.Address();

vanahcm.CommonService.EquityPlan

global class EquityPlan extends CommonObject

Represents a worker's equity plan

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
GrantReason String Grant Reason
EquityType ID Equity Type
GrantDate Date Grant Date
GrantPrice Decimal Grant Price
Amount Decimal Amount
VestingDate Date Vesting Date
VestingSchedule String Vesting Schedule
ExpirationDate Date Expiration Date

Methods

EquityPlan

global EquityPlan()

Creates a new instance of the EquityPlan

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.EquityPlan equityPlan = new vanahcm.CommonService.EquityPlan();

vanahcm.CommonService.JobApplication

global class JobApplication extends CommonObject

Represents a job application

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
Name String Name
ApplicantID String Applicant ID
ApplicationStatus String Application Status
AverageRating Decimal Average Rating
Candidate ID Candidate
CandidateEmail String Candidate Email
CandidateID ID Candidate ID
CityTown String City/Town
Country String Country
CustomUrl String Custom Url
Distance Decimal Distance
DocuSignEnvelopeId String DocuSign Envelope ID
DocuSignStatus String DocuSign Status
Email String Email
FirstName String First Name
HiringManagerEmail String Hiring Manager Email
InterviewerEmail String Interviewer Email
JobOpening ID Job Opening
LastDocuSignStatus Datetime Last DocuSign Status
LastName String Last Name
JobApplicationNumber Decimal Job Application Number
Phone String Phone
Position String Position
RecruiterEmail String Recruiter Email
Region String Region
Score Decimal Score
Source String Source
StateProvince String State/Province
StreetAddress String Street Address
ZipPostalCode String Zip/Postal Code

Methods

JobApplication

global JobApplication()

Creates a new instance of the Job Application

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.JobApplication jobApplication = new vanahcm.CommonService.JobApplication();

vanahcm.CommonService.CandidateFeedback

global class CandidateFeedback extends CommonObject

Represents a candidate's feedback

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
Name String Name
Candidate ID Candidate
Comments String Comments
JobApplication ID Job Application
Rating String Rating
Recommendation String Recommendation

Methods

CandidateFeedback

global CandidateFeedback()

Creates a new instance of the CandidateFeedback

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.CandidateFeedback candidateFeedback = new vanahcm.CommonService.CandidateFeedback();

vanahcm.CommonService.Response

global class Response extends CommonObject

Represents a response

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
Name String Name
JobApplication ID Job Application
JobQuestion ID Job Question
ResponseDate Date Response Date
ResponseText String Response Text (Old)
ResponseTextLong String Response Text Long
OwnerId ID Owner ID

Methods

Response

global Response()

Creates a new instance of the Response

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.Response response = new vanahcm.CommonService.Response();

vanahcm.CommonService.JobQuestionSet

global class JobQuestionSet extends CommonObject

Represents a job question set, including their questions

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
Description String Description
Name String Name
OwnerId ID Owner ID
JobQuestions List<vanahcm.CommonService.JobQuestion> List of JobQuestion

Methods

JobQuestionSet

global JobQuestionSet()

Creates a new instance of the JobQuestionSet

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.JobQuestionSet jobQuestionSet = new vanahcm.CommonService.JobQuestionSet();

vanahcm.CommonService.JobQuestion

global class JobQuestion extends CommonObject

Represents a job question set's questions

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
JobQuestionsName String Job Questions Name
JobQuestionnaire ID Job Question Set ID
CorrectAnswer String Correct Answer
PickListValues String Pick List Values
OwnerId ID Owner ID
QuestionName String Question Name
QuestionType String Question Type
RequiredField Boolean Required Field
ScoreResponse Boolean Score Response
Weight Decimal Weight

Methods

JobQuestion

global JobQuestion()

Creates a new instance of the JobQuestion

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.JobQuestion jobQuestion = new vanahcm.CommonService.JobQuestion();

vanahcm.CommonService.JobRequisition

global class JobRequisition extends CommonObject

Represents a job requisition

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
Name String Name
Agencies String Agencies
ApplicationDisclaimer String Application Disclaimer
AttachResume Boolean Attach Resume
BonusPercent Decimal Bonus Percent
BonusAmount Decimal Bonus Amount
BonusEligible String Bonus Eligible
CityTown String City/Town
CostCenter ID Cost Center
Country String Country
CountryCode ID Country Code
CurrencyCode String Currency Code
Department ID Department
DepartmentName String Department Name
ExternalPositionDescription String External Position Description
InternalPositionDescription String Internal Position Description
Division ID Division
EEOJobCategory String EEO Job Category
ExpenseTotal Decimal Expense Total
FullPartTimeJob String Full Time/Part Time
HiringManager ID Hiring Manager
HiringManagerEmail String Hiring Manager Email
HiringRequest String Hiring Request
HiringTeam1 ID Hiring Team 1
HiringTeam2 ID Hiring Team 2
HiringTeamEmail1 String Hiring Team Email 1
HiringTeamEmail2 String Hiring Team Email 2
IncludeApplywithLinkedIn Boolean Include Apply with LinkedIn
IncludeAttachments Boolean Include Attachments
IncludeCoverLetter Boolean Include Cover Letter
IncludeDisclaimer Boolean Include Disclaimer
IncludeJobSummary Boolean Include Job Summary
IncludeQuestions Boolean Include Questions
IncludeSharingButtons Boolean Include Sharing Buttons
Industry String Industry
Interviewer ID Interviewer
InterviewerEmail String Interviewer Email
Job ID Job
JobBoardDescription String Job Board Description
DivisionName String Division Name
JobFunction ID Job Function
JobOpeningID String Job Opening ID
JobOpeningStatus String Job Opening Status
JobOpeningURL String Job Opening URL
JobType String Job Type
LocationName String Location Name
Location ID Location
NumberofCandidates Decimal Number of Candidates
NumberofOpenings Decimal Number of Openings
Position ID Position
PositionFTE Decimal Position FTE
PositionTitle String Position Title
PostExternally Boolean Post Externally
PostingAge String Posting Age
PostingDate Date Posting Date
PostingURL String Posting URL
PostInternally Boolean Post Internally
QuestionSet ID Question Set
QuestionsOrder String Questions Order
Recruiter ID Recruiter
RecruiterEmail String Recruiter Email
Region ID Region
RegularTemporary String Regular/Temporary
RequestEducationHistory Boolean Request Education Include_Education_History__c
RequestSelfIdentification Boolean Request Self Identification
RequestWorkHistory Boolean Request Work History
SalaryFrom Decimal Salary From
SalaryFrequency String Salary Frequency
SalaryTo Decimal Salary To
ScheduledHours Decimal Scheduled Hours
SelfIdentificationText String Self Identification Text
StateProvince String State/Province
SummaryDescription String Summary Description
TargetStartDate Date Target Start Date
ZipPostalCode String Zip Postal Code
OwnerId ID Owner ID

Methods

JobRequisition

global JobRequisition()

Creates a new instance of the JobRequisition

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.JobRequisition jobRequisition = new vanahcm.CommonService.JobRequisition();

vanahcm.CommonService.Candidate

global class Candidate extends CommonObject

Represents a candidate, including their education and work experience

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
Name String Name
AddToTalentPool Boolean Add to Talent Pool
AlternateNumber String Alternate Number
AreYouAtLeast18YearsOfAge String Are you at least 18 years of age?
AreYouAvailableWeekends String Are you available weekends?
AreYouEligibleToWorkInTheUS String Are you eligible to work in the U.S.?
AreYouWillingToRelocate String Are you willing to relocate?
AverageRating Decimal Average Rating
CandidateID String Candidate ID
CityTown String City/Town
CountryCode ID Country Code
Country String Country
DesiredSalary String Desired Salary
DocuSignEnvelopeId String DocuSign Envelope Id
DocuSignStatus String DocuSign Status
EarliestStartDate Date Earliest Start Date
Email String Email
EmployeeReferral ID Employee Referral
Ethnicity String Ethnicity
Extension String Extension
FirstName String First Name
Gender String Gender
LanguagesSpoken String Languages Spoken
LastDocuSignStatus Datetime Last DocuSign Status
LastName String Last Name
LinkedInProfileURL String LinkedIn Profile URL
MiddleName String Middle Name
NationalID String National ID
PhoneNumber String Phone Number
Prefix String Prefix
ReferralName String Referral Name
Region String Region
Source String Source
StateProvince String State/Province
Status String Status
StreetAddress String Street Address
Suffix String Suffix
TwitterProfile String Twitter Profile
VeteranDisabilityStatus String Veteran & Disability Status
Website String Website
Worker ID Worker
ZipPostalCode String Zip/Postal Code
OwnerId ID Owner ID
CoverLetter String Cover Letter
OtherDetail String Other Detail
Resume String Resume
FormattedResume String Formatted Resume
CandidateWorkExperiences List<vanahcm.CommonService.CandidateWorkExperience> List of CandidateWorkExperience
CandidateEducations List<vanahcm.CommonService.CandidateEducation> List of CandidateEducation

Methods

Candidate

global Candidate()

Creates a new instance of the Candidate

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.Candidate candidate = new vanahcm.CommonService.Candidate();

vanahcm.CommonService.CandidateWorkExperience

global class CandidateWorkExperience extends CommonObject

Represents a candidate's work experience

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
EmployerName String Employer Name
FromDate Date From Date
CandidateId ID Candidate ID
PositionTitle String Position Title
Responsibilities String Responsibilities
ToDate Date To Date

Methods

CandidateWorkExperience

global CandidateWorkExperience()

Creates a new instance of CandidateWorkExperience

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.CandidateWorkExperience workExperience = new vanahcm.CommonService.CandidateWorkExperience();

vanahcm.CommonService.CandidateEducation

global class CandidateEducation extends CommonObject

Represents a candidate's education

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
InstitutionName String Institution Name
DegreeDiploma String Degree/Diploma
CandidateId ID Candidate ID
EndDate Date End Date
ProgramOfStudy String Program of Study
StartDate Date Start date

Methods

CandidateEducation

global CandidateEducation()

Creates a new instance of CandidateEducation

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.CandidateEducation education = new vanahcm.CommonService.CandidateEducation();

vanahcm.CommonService.NewHire

global class NewHire extends CommonObject

Represents a new hire wizard

This class extends vanahcm.CommonService.CommonObject

Properties

Name Type Description
JobId ID Job ID
Worker vanahcm.CommonService.Worker Worker

Methods

NewHire

global NewHire()

Creates a new instance of the NewHire

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

vanahcm.CommonService.NewHire newhire = new vanahcm.CommonService.NewHire();
© Copyright 2009–2019 FinancialForce.com, inc. Confidential – all rights reserved. Various trademarks held by their respective owners.