web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • huijij Profile Picture
    19,811 on at

    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.

  • Marcus Khoo Profile Picture
    7 on at

    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

  • Verified answer
    Parag Chapre Profile Picture
    12,254 Most Valuable Professional on at

    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

    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

  • Suggested answer
    Parag Chapre Profile Picture
    12,254 Most Valuable Professional on at

    Hi Marcus,

    You need to update record in PersonalIdentication odata entity.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans