Skip to main content
Solved

Updating record with foreign keys using ODATA

  • February 22, 2023
  • 1 reply
  • 79 views

Forum|alt.badge.img+1

Hi for a external application we would like to update records using the ODATA API. but we’ve noticed that updating foreign keys returns a `403 Forbidden`, but mutating the normal columns update fine.

We’ve tried this using a PATCH/POST request and a STAGED record, both fail in the end. curiously the STAGED record only adds the non-key values to the STAGED record even when u try to pot a key in, it does not accept it.

We currently work around this using a subroutine, but would be alot better if we could just mutate the record directly instead of writing subroutines for every table we need.

 

Using a patch:

Using a POST request
Using a staged record, adding the key values in the initial post request results in only 1 column being added instead of 5

 

Best answer by Erwin Ekkel

What rights does the user have on these columns, and are they editable in subject? The api follows the same rules as the gui so if the column is not editable in the GUI then it's not editable in Odata/API. 

View original
Did this topic help you find an answer to your question?
This topic has been closed for replies.

1 reply

Forum|alt.badge.img+17
  • Moderator
  • 766 replies
  • Answer
  • February 23, 2023

What rights does the user have on these columns, and are they editable in subject? The api follows the same rules as the gui so if the column is not editable in the GUI then it's not editable in Odata/API. 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings