Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How do I update a PersonalIdentificationNumber via REST?

(1) ShareShare
ReportReport
Posted on by 7

Hi
I am using Finance & Operations 10.0.20 and can use the REST API to
CREATE
UPDATE
worker records as long as I have the primary key.
So this URL will works with a PATCH request

https://{host}/data/Workers(PersonnelNumber = '{PERS_NUMBER}')

My issue is when I want to UPDATE a PersonalIdentificationNumber
I do not have a "primary key" so am unable to use the same technique to update an existing entry

Question
How do I update a PersonalIdentificationNumber?

Thanks

  • Suggested answer
    Parag Chapre Profile Picture
    12,248 Most Valuable Professional on at
    RE: How do I update a PersonalIdentificationNumber via REST?

    Hi Marcus,

    You need to update record in PersonalIdentication odata entity.

  • Marcus Khoo Profile Picture
    7 on at
    RE: How do I update a PersonalIdentificationNumber via REST?

    Hi Parag, thanks for the reply

    Yes, that does make sense.

    So I think you are saying I have to use a REST CALL to update the WORKER entity and somehow indicate that the related PersonalIdentifcation item will need to be changed..

    However, what JSON would be needed for this to work in the PATCH request?  I cannot find any information on line with an example to the REST endpoint of

    "/data/Workers({primary_key})

    The only JSON I have is that for the worker entity itself - which does not include any of PersonalIdentication information.

    Thanks

    /Marcus

  • Verified answer
    Parag Chapre Profile Picture
    12,248 Most Valuable Professional on at
    RE: How do I update a PersonalIdentificationNumber via REST?

    Hi Marcus,

    You need to use two tables.

    1. Worker

    2. HcmPersonIdentification

    Here, you have party id as a relation. Based on this, you can update the person identification in HcmPersonIdentification not in worker table.

    I hope this helps.

  • Marcus Khoo Profile Picture
    7 on at
    RE: How do I update a PersonalIdentificationNumber via REST?

    Hi, thanks for the reply.  
     I do not want to change the primary key but rather want to know what it is.

    When performing an update of an item using REST, the PATCH request URI must uniquely identify the item to be updated.  
    Hence one must know the primary key of the item.

    When I retrieve all the PersonalIdentification items for a specific Party number (a user in my instance). the response contains values for each Identification item but there is not an element in the returned JSON that represents a primary key for any one value.

    Without knowing the primary key of the item I cannot generate a REST URI to do the update - hence the question…

    beet regards

  • huijij Profile Picture
    19,811 on at
    RE: How do I update a PersonalIdentificationNumber via REST?

    Hi Marcus,

    What do you mean by you do not have a "primary key"? Primary keys cannot be updated and will violate the uniqueness constraint.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,933 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,801 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans