Skip to main content
Solved

Problem in adding a new record by new endpoint

  • Apr 22, 2021 7:39 AM UTC
  • 8 replies
  • 303 views
  • Translate All

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.

View original

8 replies

Naveen Boga
Captain II
Forum|alt.badge.img+20
  • Captain II
  • Apr 22, 2021 8:08 AM UTC

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

 

Translate

  • Author
  • Jr Varsity II
  • Apr 22, 2021 8:12 AM UTC

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.

 
Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20
  • Captain II
  • Apr 22, 2021 8:33 AM UTC

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. 

Translate

  • Author
  • Jr Varsity II
  • Apr 22, 2021 9:02 AM UTC

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

 

 
Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20
  • Captain II
  • Answer
  • Apr 22, 2021 9:20 AM UTC

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

Translate

  • Author
  • Jr Varsity II
  • Apr 22, 2021 9:25 AM UTC

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

Translate

  • Author
  • Jr Varsity II
  • Apr 23, 2021 1:08 AM UTC

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

 

Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20
  • Captain II
  • Apr 23, 2021 4:28 AM UTC

@mohamed1walha Great :) Thanks for sharing an update.

Translate