Solved

Problem in adding a new record by new endpoint

  • 22 April 2021
  • 8 replies
  • 41 views

Userlevel 2

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.

icon

Best answer by Naveen B 22 April 2021, 11:20

@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

Userlevel 6
Badge +3

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

 

Userlevel 2

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.

 
Userlevel 6
Badge +3

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. 

Userlevel 2

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

 

 
Userlevel 6
Badge +3

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

Userlevel 2

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

Userlevel 2

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

 

Userlevel 6
Badge +3

@mohamed1walha Great :) Thanks for sharing an update.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2020  Acumatica, Inc. All rights reserved