Avatar

GAIA_UN10 Error When Submitting record with REST

Dave Gilpin

I am intermittent receiving the following error when trying to add a record via REST.  I have not created a RECORD_ID type field in the app and I am not sending a value for any such field.  Does anyone have more information about this error?  I can't find any references to it anywhere.  Thanks

{"code":"GAIA_UN10","id":"lS5yoGLzMDI7dxq2my96","message":"Cannot update field whose type is RECORD_ID."}

Follow 3 followers
0

7 comments

Avatar
Sean Tachibana 0 votes

Hello Dave,

A similar error occurred when I executed the following POST request, including the record number.

 

var parm = {

"app":3904,

"record":{

"recordnumber":{

"value": "1"

}

}

};

kintone.api(

'/k/v1/record',

'POST',

parm,

function(event){console.log(event);},

function(err){console.log(err);}

);
 
-----

{code: "GAIA_UN10", id: "agft0ToUpCWMfB3sAv6p", message:

"Cannot update field whose type is RECORD_ID."}

-----
 
But as mentioned,
 
>I have not created a RECORD_ID type field in the app and I am not sending a value for any such field.
 
So, the situation may be different.
 
Could you kindly describe the request parameters that causes it and/or how it is being executed?
 
Thanks,
 
Sean
0
Comment actions Permalink
Avatar
Dave Gilpin 1 vote

Okay, I finally had time to sit and watch until it started erring again.  I don't know that this will help, since the same data can error and then if I wait a few minutes and try again, I don't get the error, but following is the json and then the error.  Thanks

 

{"app":23,"records":[{"sender_email":{"value":"Smith, John L"},"sender":{"value":"Smith, John L"},"issue":{"value":"Scheduling Phone Lines "},"market":{"value":"GCM"},"issue_id":{"value":2421},"from":{"value":"Smith, Jane E"},"date_time":{"value":"2020-07-07T13:03:00Z"},"note":{"value":"Good morning,

 

Can we get the attached order scheduled at 1030 am 7/8

 

 

Thank you,

 

Jane

Get Outlook for iOS <https://aka.ms/o0ukef>

________________________________"}}]}

 

 

{"code":"GAIA_UN10","id":"k18Uikkx29T2SojNqw7l","message":"Cannot update field whose type is RECORD_ID."}

1
Comment actions Permalink
Avatar
Sean Tachibana 0 votes
Hello Dave,
 
I executed the request based on the JSON you provided, but the phenomenon was not replicated.
 
Therefore, the cause of the problem is still unclear at the moment.
I thought it was the problem with the AWS environment "kintone," but there is no problem there either.
 
Although, the issue_id exists in JSON, and if the field code for the Record number is changed to
"issue_id," the same phenomenon will be replicated.
 
※As you cannot add records by specifying "Record number," which is why the "GAIA_UN10" error occurs.
 
However, the situation is a little different, as you said, it can be done after some time.
 
If possible, make sure you haven't changed the field code for "Record number" or try to reduce
the number of fields in the request to isolate and figure out which fields are being affected.
 
Hopefully, this helps.
 
Sean
0
Comment actions Permalink
Avatar
Dave Gilpin 0 votes

The app only has four fields.  

   Number field with a Field Code of issue_id

   Text field with a Field Code of from

   Date and Time field with a Field Code of date_and_time

   Text Area field with a Field Code of note

None of the fields have any of their checkboxes checked under Settings, except the Date and Time field, which had "Default to the record creation date and time." checked by default. 

The error is intermittent and the same data can be submitted successfully at a later time.  Thus, I don't think the problem is in my code or the data being sent.

There is no record number or record_id field on the app and no record number or record_id being submitted, so the error being returned may be incorrect..

0
Comment actions Permalink
Avatar
Sean Tachibana 0 votes

Hello Dave,

 

You mentioned, "The app only has four fields." but,
the JSON you provided us last time had other fields such as "sender_email" and "market."

 

Can I ask you to confirm the following again?

・What is the information on the following data,

{"app":23,"records":[{"sender_email":{"value":"Smith, John 
L"},"sender":{"value":"Smith, John L"},"issue":{"value":"Scheduling
Phone Lines "},"market":{"value":"GCM"},"issue_id":
{"value":2421},"from":{"value":"Smith, Jane E"},"date_time":
{"value":"2020-07-07T13:03:00Z"},"note":{"value":"Good morning,

 

・Is the app ID of the app sending the request correct?

 

・Details of the request in case of an error
→ The information you provided last time was considered a possible response.

 

You can get a list of the following fields on the console screen and, by executing the GET API,
you can retrieve the field information, so could you please send me a screenshot of the result of the execution?

var parm = {
"app": < The app ID of the app that causes the phenomenon >
};
kintone.api(
'/k/v1/app/form/fields',
'GET',
parm,
function(event){
console.log(event);
},
function(err){
console.log(err);
}
);

 

Get Form Fields:
https://developer.kintone.io/hc/en-us/articles/115005509288-Get-Form-Fields

 

Thank you.

Sean

0
Comment actions Permalink
Avatar
Dave Gilpin 1 vote

I apologize.  I ended up including json from a different app in my last post.  I will try to capture the correct json the next time it happens.  Below is the output of the GET.  It does appear to have a Record Number field, but I do not see that field when editing the form (see image.)

 

{"revision":"22","properties":{"Status":{"type":"STATUS","code":"Status","label":"Status","enabled":false},"Assignee":{"type":"STATUS_ASSIGNEE","code":"Assignee","label":"Assignee","enabled":false},"note":{"type":"MULTI_LINE_TEXT","code":"note","label":"Note","noLabel":false,"required":false,"defaultValue":""},"Updated_datetime":{"type":"UPDATED_TIME","code":"Updated_datetime","label":"Updated datetime","noLabel":false},"Created_datetime":{"type":"CREATED_TIME","code":"Created_datetime","label":"Created datetime","noLabel":false},"issue_id":{"type":"NUMBER","code":"issue_id","label":"Issue ID","noLabel":false,"required":false,"minValue":"","maxValue":"","digit":false,"unique":false,"defaultValue":"","displayScale":"","unit":"","unitPosition":"BEFORE"},"Categories":{"type":"CATEGORY","code":"Categories","label":"Categories","enabled":false},"date_and_time":{"type":"DATETIME","code":"date_and_time","label":"Date and time","noLabel":false,"required":false,"unique":false,"defaultValue":"","defaultNowValue":true}
,"Record_number":{"type":"RECORD_NUMBER","code":"Record_number","label":"Record number","noLabel":false},"from":{"type":"SINGLE_LINE_TEXT","code":"from","label":"From","noLabel":false,"required":false,"minLength":"","maxLength":"","expression":"","hideExpression":false,"unique":false,"defaultValue":""},"Created_by":{"type":"CREATOR","code":"Created_by","label":"Created by","noLabel":false},"Updated_by":{"type":"MODIFIER","code":"Updated_by","label":"Updated by","noLabel":false}}}

 

1
Comment actions Permalink
Avatar
Yasuhisa Kaneko 0 votes

"Record number" is displayed on the form screen by placing it on the form.
Even if it is not placed in the form, it will be the information to be acquired by API for getting the list of fields and record acquisition process "GET".

In addition, from the information acquired by the API that gets the list of fields, we have confirmed that "Record number" is left as default and not changed.

However, since the details of the request sent are unknown, it is hard to determine the cause.

Even if we create an application based on the information you provided and execute it with the following request, the error is not reproduced.

var parm = {
  "app": < The app ID of the app that causes the phenomenon >,
  "records":[
  {
  "issue_id":{
  "value":2421
  },
  "from":{
  "value":"Smith, Jane E"
  },
  "date_time":{
  "value":"2020-07-07T13:03:00Z"
  },
  "note":{
  "value":"Good morning"
  }
  }
  ]
};

kintone.api(
  '/k/v1/records',
  'POST',
  parm,
  function(event){
  console.log(event);
  },
  function(err){
  console.log(err);
  }
);

Please check to see if the error is reproduced when you perform above process on the console screen.

If the error is not reproduced, there might be a problem in the content corresponding to the parm of the created process, so please check it as well.

If you let us know the contents to be set in parm, we can check it as well.

Thank you,

Yasu

0
Comment actions Permalink