adding new work history

Forum for users and developers of Bullhorn's Webservices API suite

Moderators: StaffingSupport, s.emmons, BullhornSupport

mgeltser
User
Posts: 19
Joined: Wed Dec 31, 1969 8:00 pm

adding new work history

Post by mgeltser » Mon Oct 28, 2013 2:53 pm

I am trying to add new candidateWorkHistory and getting the following error:
org.hibernate.PropertyValueException: not-null property references a null or transient value: com.bullhorn.entity.candidate.CandidateWorkHistory.candidate

I have populated all the required fields:
candidateID,
dateAdded,
isDeleted
and isLastJob

Since I am adding, I cannot populate candidateWorkHistoryID, so I left it blank.

Please help,
Mike

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by s.emmons » Tue Oct 29, 2013 3:14 pm

Hi Mike,

Can you provide the exact request you tried to pass?

It looks like we have a field here that is not-nullable but not marked as so in the documentation, but I'd like to test a few things with your request.
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

mgeltser
User
Posts: 19
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by mgeltser » Tue Oct 29, 2013 3:55 pm

I am using .NET

Unfortunately I don't know how to look up the request as xml, but below data should answer your question I hope:
candidateWorkHistoryDto
bonus 0.0 Double
bonusField 0.0 Double
bonusFieldSpecified False Boolean
bonusSpecified False Boolean
candidateID 189154 Integer
candidateIDField 189154 Integer
candidateIDFieldSpecified False Boolean
candidateIDSpecified False Boolean
candidateWorkHistoryID 0 Integer
candidateWorkHistoryIDField 0 Integer
candidateWorkHistoryIDFieldSpecified False Boolean
candidateWorkHistoryIDSpecified False Boolean
clientCorporationID 0 Integer
clientCorporationIDField 0 Integer
clientCorporationIDFieldSpecified False Boolean
clientCorporationIDSpecified False Boolean
comments Nothing String
commentsField Nothing String
commission 0.0 Double
commissionField 0.0 Double
commissionFieldSpecified False Boolean
commissionSpecified False Boolean
companyName "Employer3" String
companyNameField "Employer3" String
customDate1 #12:00:00 AM# Date
customDate1Field #12:00:00 AM# Date
customDate1FieldSpecified False Boolean
customDate1Specified False Boolean
customDate2 #12:00:00 AM# Date
customDate2Field #12:00:00 AM# Date
customDate2FieldSpecified False Boolean
customDate2Specified False Boolean
customDate3 #12:00:00 AM# Date
customDate3Field #12:00:00 AM# Date
customDate3FieldSpecified False Boolean
customDate3Specified False Boolean
customDate4 #12:00:00 AM# Date
customDate4Field #12:00:00 AM# Date
customDate4FieldSpecified False Boolean
customDate4Specified False Boolean
customDate5 #12:00:00 AM# Date
customDate5Field #12:00:00 AM# Date
customDate5FieldSpecified False Boolean
customDate5Specified False Boolean
customFloat1 0.0 Double
customFloat1Field 0.0 Double
customFloat1FieldSpecified False Boolean
customFloat1Specified False Boolean
customFloat2 0.0 Double
customFloat2Field 0.0 Double
customFloat2FieldSpecified False Boolean
customFloat2Specified False Boolean
customFloat3 0.0 Double
customFloat3Field 0.0 Double
customFloat3FieldSpecified False Boolean
customFloat3Specified False Boolean
customFloat4 0.0 Double
customFloat4Field 0.0 Double
customFloat4FieldSpecified False Boolean
customFloat4Specified False Boolean
customFloat5 0.0 Double
customFloat5Field 0.0 Double
customFloat5FieldSpecified False Boolean
customFloat5Specified False Boolean
customInt1 0 Integer
customInt1Field 0 Integer
customInt1FieldSpecified False Boolean
customInt1Specified False Boolean
customInt2 0 Integer
customInt2Field 0 Integer
customInt2FieldSpecified False Boolean
customInt2Specified False Boolean
customInt3 0 Integer
customInt3Field 0 Integer
customInt3FieldSpecified False Boolean
customInt3Specified False Boolean
customInt4 0 Integer
customInt4Field 0 Integer
customInt4FieldSpecified False Boolean
customInt4Specified False Boolean
customInt5 0 Integer
customInt5Field 0 Integer
customInt5FieldSpecified False Boolean
customInt5Specified False Boolean
customText1 "987 Stal St." String
customText1Field "987 Stal St." String
customText2 "Kiev" String
customText2Field "Kiev" String
customText3 "NY" String
customText3Field "NY" String
customText4 "65432" String
customText4Field "65432" String
customText5 "432-654-7654" String
customText5Field "432-654-7654" String
customTextBlock1 Nothing String
customTextBlock1Field Nothing String
customTextBlock2 Nothing String
customTextBlock2Field Nothing String
customTextBlock3 Nothing String
customTextBlock3Field Nothing String
dateAdded #12:00:00 AM# Date
dateAddedField #12:00:00 AM# Date
dateAddedFieldSpecified False Boolean
dateAddedSpecified False Boolean
endDate #10/1/1995# Date
endDateField #10/1/1995# Date
endDateFieldSpecified True Boolean
endDateSpecified True Boolean
isDeleted False Boolean
isDeletedField False Boolean
isDeletedFieldSpecified False Boolean
isDeletedSpecified False Boolean
isLastJob False Boolean
isLastJobField False Boolean
isLastJobFieldSpecified False Boolean
isLastJobSpecified False Boolean
jobOrderID 0 Integer
jobOrderIDField 0 Integer
jobOrderIDFieldSpecified False Boolean
jobOrderIDSpecified False Boolean
migrateGUID Nothing String
migrateGUIDField Nothing String
placementID 0 Integer
placementIDField 0 Integer
placementIDFieldSpecified False Boolean
placementIDSpecified False Boolean
PropertyChangedEvent Nothing System.ComponentModel.PropertyChangedEventHandler
salary1 0D Decimal
salary1Field 0D Decimal
salary1FieldSpecified False Boolean
salary1Specified False Boolean
salary2 0D Decimal
salary2Field 0D Decimal
salary2FieldSpecified False Boolean
salary2Specified False Boolean
salaryType Nothing String
salaryTypeField Nothing String
startDate #1/1/1990# Date
startDateField #1/1/1990# Date
startDateFieldSpecified True Boolean
startDateSpecified True Boolean
terminationReason Nothing String
terminationReasonField Nothing String
title "Not President" String
titleField "Not President" String

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by s.emmons » Thu Oct 31, 2013 9:31 am

Hi Mike,

What version of the API are you using?

I just tested with WebServices 2.5 and am able to create new CandidateWorkHistory records with the following:

Code: Select all

  <dto xsi:type="ns4:candidateWorkHistoryDto" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="http://candidate.entity.bullhorn.com/">
               <candidateID>5148986</candidateID>
               <dateAdded>2013-10-31T09:28:57.353-04:00</dateAdded>
               <isDeleted>false</isDeleted>
               <isLastJob>false</isLastJob>
               <startDate>2013-10-31T00:00:00-04:00</startDate>
            </dto>
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

mgeltser
User
Posts: 19
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by mgeltser » Thu Oct 31, 2013 10:17 am

I am using 2.0
2.5 had a bug, when internal candidates were excluded in searches, so we had to move back to 2.0

If this bug is fixed now, I can try 2.5...

Will let you know...

Mike

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by s.emmons » Thu Oct 31, 2013 10:32 am

Hi Mike,

I just wanted to let you know that I tried the same DTO in 2.0 and it went through successfully.
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

mgeltser
User
Posts: 19
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by mgeltser » Thu Oct 31, 2013 10:55 am

I figured out my problem, needed to set candidateIDSpecified to True (since it's .Net)

It's working now.

On a different note - will you guys be fixing 2.5, so we can query for candidates marked internal?

It would be nice...

Mike

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by s.emmons » Mon Nov 11, 2013 10:39 am

Hi Mike,

Glad to hear you got it working!

Can you clarify what you mean by candidates marked as internal? For example, is this just a status or is there another way candidates are being marked as such?
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

mgeltser
User
Posts: 19
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by mgeltser » Wed Nov 13, 2013 4:57 pm

I mean status = 'Private'

MG

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by s.emmons » Thu Nov 14, 2013 11:11 am

Hi Mike,

This is most likely an entitlements issue. What response to you get when you query for candidates where status = Private ?
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

mgeltser
User
Posts: 19
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by mgeltser » Thu Nov 14, 2013 11:35 am

I do not get any errors.
When I query for Candidates: isDeleted = 0 and email = 'whatever@candidate.com' and password = 'password'
I get no results back in 2.5, but in 2.0 I get my candidate back.

When 2.5 was released I was told that this is a bug, and will be fixed later. I just want to know when "later" will happen?

Thanks,
MG

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by s.emmons » Thu Nov 14, 2013 11:44 am

Hi Mike,

I'm not seeing that problem on my end.

I can run a query on the same three fields and it is returning expected results.
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

mgeltser
User
Posts: 19
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by mgeltser » Thu Nov 14, 2013 11:54 am

try this query in 2.5
isDeleted = 0 and email = 'areid@jacobsononline.com' and password = 'Che27rry'

I get nothing back

s.emmons
User
Posts: 333
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by s.emmons » Thu Nov 14, 2013 12:01 pm

Hi Mike,

I got a return:

<ids xsi:type="xs:int" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">356076</ids>

My guess is this has to do with the credentials you are using to startSession, since you are most likely not seeing the ID returned because you do not have the entitlements to view this record.
Sam Emmons
Enterprise Team Lead
BULLHORN
US Support 617-478-9126

mgeltser
User
Posts: 19
Joined: Wed Dec 31, 1969 8:00 pm

Re: adding new work history

Post by mgeltser » Thu Nov 14, 2013 12:22 pm

Ok, how can this be fixed?

Post Reply