1
0
-1

I'm using JSON

API#web/json/data/form/store/(*:appId)/(*:formId)/(*:primaryKeyValue)

when I make an update I have to send the primaryKeyValue which works fine but when I need to add new row I don't need to send the primaryKeyValue the row gets created but the return that comes back doesn't include the primarykey. it come back like this 

{
"id": ""
}

just that you know the id is auto generated. 

plus how can we enhance the generic error code that I'm getting from SQL server

"message": "{\"error\":{\"formid\":\"Error storing data: could not execute statement\"}}" is there a way to get SQL server Error message displayed.

 

appreciate your help.

thanks.

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      primaryKeyValue is not a required parameter if you don't pass one it creates new record. if you pass a value and the value already exists it updates the existing record.

      here is the catch if you pass a value that doesn't exists it will create a new record but the new row will have the next auto generated value not necessarily the value you passed.

         

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi, isn't the primaryKeyValue a required parameter? I believe detailed error information is in the logs and not disclosed for security purposes.

          CommentAdd your comment...