Key field in Webservice

azharsaeedkhanazharsaeedkhan IslamabadMember Posts: 29
Page 201 "Job Journal" is published as a webservice, when i read multiple lines from the job journal through post request from Postman i get all the data plus a field "Key". I am not sure where that "Key" is coming from and how is its value populated.

n9a6nol0saoe.png

I want to store this key to a custom field in Job Journal Line table, but i am not able to find it. I don't know if its generated at Runtime. Anyone here has any idea about this?

Thanks in advance.

Answers

  • JuhlJuhl Member Posts: 720
    Its used to reference the record when writing back.
    Follow me on my blog juhl.blog
  • azharsaeedkhanazharsaeedkhan IslamabadMember Posts: 29
    Juhl wrote: »
    Its used to reference the record when writing back.

    how can i store this key field in a custom field xyz in business central?
  • JuhlJuhl Member Posts: 720
    No need to store it, its only valid as long the record hasent changed.
    So if you need to update or delete a record, you get the record, and use the key when you send a update or delete afterwards.
    Follow me on my blog juhl.blog
  • azharsaeedkhanazharsaeedkhan IslamabadMember Posts: 29
    Juhl wrote: »
    No need to store it, its only valid as long the record hasent changed.
    So if you need to update or delete a record, you get the record, and use the key when you send a update or delete afterwards.

    The requirement is that i need to store the Key in a custom field in Job Journal table and when the Job Journal lines are posted i want the Key to be transferred to Job Ledger Entries as well
  • JuhlJuhl Member Posts: 720
    Why, its invalid the moment you change or post the line.
    Its an integration key, not static data to be stored.
    Follow me on my blog juhl.blog
  • HassnainHassnain Member Posts: 1
    edited 2021-07-23
    @Juhl,
    Azhar and me are working on this task to get it accomplished. We are aware of it that its not static field. Another developer is using this key for his reference for integration with mobile app. So as per our new requirement it is our utmost need to copy this (key) field in any other XYZ field in the same table. Once we get its copy we can simply use it for our business logic.
    So, how can we copy that field. Is this even possible or not?
Sign In or Register to comment.