cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Upsert costCenter via empJob not allowed?

nathanhand1
Explorer
0 Likes
1,341

Hiya,

I have a requirement to upsert a job change via the OData API which would include a cost center change among other things. However, when I come to upsert a record via empJob for 'costCenter' this is stated as not allowed.

Specifically, the following error occurs:

Property costCenter is not upsertable. Please check the property setting in Admin Center > OData API Data Dictionary or the entity metadata.

You can perform this change in the UI of successFactors, why is this change not allowed via the odata API? Or is there an alternative api for changing an employees cost center?

Many thanks,
Nathan Hand

Accepted Solutions (1)

Accepted Solutions (1)

nlgro02343
Active Contributor

Cost Center, generally speaking, is a valid field to upsert (not sure if your odata dictionary suggests otherwise, but mine does permit it. If so it's definitely a config thing to fix).

There could be a couple of reasons why it could provide that error (keep in mind that errors don't always accurately reflect what the actual issue is).
1. You may not have rights to edit the field (unlikely, but definitely an option), something to check in business configuration --> jobInfo
2. You may lack rights on the object itself (you can check object definition --> Cost Center to see if API visibility is Editable) and/or permissions in general (but that's a bit more of a stretch to find exactly what as it could be cost center as part of Misc Permissions or other api rights)
3. The cost center (or other associations) are inactive, that can quite easily be checked in manage data.
4. A business rule is not allowing you to do so, best to temporarily disable them to see if they are causing the issue
5. Something else is causing the conflict and it will be trail and error to spot it (unfortunately there is no easy answer there), definitely worth it logging a ticket then

nathanhand1
Explorer
0 Likes

Hiya,

I have admin permissions so as far as I can tell this isn't a permissions-based issue.

To confirm as your post maybe makes me think you're talking specifically about cost centers standalone to a person. I'm not trying to upsert a new cost center, but update the job information of an employee via the upsert API so something like this:

I can use this same method to update many other fields, but yes checking the data dictionary as suggested by the error upsertable is set to 'false' for 'costCenter' in the 'empJob' entity type.

Is this configurable? Considering it's a standard field I'm sure I saw somewhere in my googling around that standard fields aren't changeable in this way.

Many thanks for your reply!

Answers (1)

Answers (1)

nlgro02343
Active Contributor

I was indeed clear on the type of query, but the postman request definitely helped.
Despite it looking like very few fields for job info, it looks about alright, so I wouldn't expect many issues there (assuming it doesn't refuse due to stuff like sequence number missing).
I was offering those checks as something is unrightfully causing cost center to not be upsertable then, because in my screenshot you can see as well that it is definitely possible to get it upsertable (the question is just: what is it in your instance that is blocking that?)
costcenter.jpg

My options are things of which I am aware that could contribute to it (don't forget to do a metadata refresh as well as otherwise the API won't reflect the field changes), but you can of course also log a ticket to find out why it's not upsertable in your instance.

nathanhand1
Explorer
0 Likes

The worst part about this is the following KBA which states that these values can't be changed and are set by the system, although perhaps that simply means it's derived from other config in the system and there's nothing for this directly.

Just to show that I'm not insane that this isn't upsertable for me:

I'll certainly get help checking over the items you mentioned initially and if not raise a ticket as regardless I do need this to be upsertable.

Many thanks!