web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

ODATA Patch / Update a field value of the entity key

(0) ShareShare
ReportReport
Posted on by 1,650

Hello,

I created a custom entity based on the table HcmPersonSkill. I'm trying to update the field "HcmPersonSkill.RatingLevelDate" via ODATA patch which is part of the primary key of the table as well as the entity key. Unfortunatly the update is not processed. I could not even see the new value from the JSON Body in the Debugger. Other fields like "HcmPersonSkill.Experience" are transferred and updated correctly and displayed in the variables in the debugger:

5226.pastedimage1665147924889v1.png

Do you have any idea why this value is not transferred?

Thanks

Sebastian

I have the same question (0)
  • Martin Dráb Profile Picture
    238,751 Most Valuable Professional on at

    Does it work with the standard entity? If not, then we don't necessarily need to talk about your custom entity, because the problem can be demonstrated on the standard one. If it works there and not with your entity, the question is what you changed.

    By the way, RatingLevelDate isn't a part of the primary key of HcmPersonSkill table. The primary key is SurrogateKey, i.e. RecId.

  • Sebastian Aurand Profile Picture
    1,650 on at

    Thanks Martin for your response. The standard entity ("HcmPersonSkillEntity") shows the identical behaviour ("YearsOfExperience" is updated and "LevelDate NOT):

    pastedimage1665384486888v1.png

    Whereas in the UI of D365 you could change the "LevelDate".

  • JV13 Profile Picture
    41 on at
    @Sebastian, Did you get any resolution to this, I am also facing the same issue. Is there a way to update that date value in your example (or a field which is part of entity key) using odata patch call?
  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    Try this way.
     
    Try updating entity from ssms. If it works, then do a post request to update the data.
  • Suggested answer
    Layan Jwei Profile Picture
    8,165 Super User 2026 Season 1 on at
    Hi Sebastian,

    The Entity key for the standard entity HcmPersonSkillEntity is[PartyNumber, LevelType, HrmSkillLevelType and LevelDate]
    url/data/PersonSkills(PartyNumber='xx',LevelType=Microsoft.Dynamics.DataEntities.HrmSkillLevelType'yy',SkillId='zz',LevelDate=2023-12-22T12:00:00Z)

    Which means, that you can update any field except those 4 fields. If you want to change those fields, then you need to insert a new record.

    if for example, you use DMF to import into this entity, you'll notice that if you pass existing values for the combination of those 4 fields, an update will occur. However, if you make the value of one of those fields different than an existing value, then an insert will occur.

    So I think, if you want to update LevelDate, it needs to not be part of the entity key in ur custom entity. --try it and let us know please 

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 510 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 399

#3
Adis Profile Picture

Adis 251 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans