Skip to main content
Answer

Problem in adding a new record by new endpoint

  • April 22, 2021
  • 8 replies
  • 221 views

Hello,

 

I have created a new screen with a new graph, Also I have created an endpoint with this screen.

 

 

The problem persists when i want to save a new record by this API. In fact if the table in the database is empty he create a new record but when i have one record he edit it.

 

 

 

Best regards.

Best answer by Naveen Boga

@mohamed1walha  You should pass the Primary Key value to create a new record, without key-value system will not create/update the record.

8 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • April 22, 2021

HI @mohamed1walha What is the error you are getting through EndPoint ?

 


  • Author
  • Jr Varsity II
  • April 22, 2021

Hi @Naveen B . I have no error, the transaction was successfully. the problem is he edit the last record, but my need to add new record.

 

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • April 22, 2021

Hi, @mohamed1walha Below is the process when you syncing the entities using endpoints.

When you are passing the details from Endpoint including “Primary Key” then it will go and update the existing record. If the Primary Key value NOT present in your system then it will create a new record. 


  • Author
  • Jr Varsity II
  • April 22, 2021

Tahnk you, @Naveen B  I have check my Endpoint, it not including a primary key. I have the same problem.

 

 

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • Answer
  • April 22, 2021

@mohamed1walha  You should pass the Primary Key value to create a new record, without key-value system will not create/update the record.


  • Author
  • Jr Varsity II
  • April 22, 2021

thanks @Naveen B i will try with the primary key.


  • Author
  • Jr Varsity II
  • April 23, 2021

@Naveen B, it works, thank you very much.

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • April 23, 2021

@mohamed1walha Great :) Thanks for sharing an update.