pen one
12/23/2021, 4:40 PM{\"id\":\"64458\",\"type\":\"salesorder\",\"isDynamic\":false,\"fields\":
but was expecting something like this:
{
"id": "64458"
"type": "salesorder"
"isDynamic": false
"fields": {
is this an insomnia thing or am i doing something wrong.
My code does contain the following:
"Content-Type: application/json"
battk
12/23/2021, 4:41 PMbattk
12/23/2021, 4:42 PMbattk
12/23/2021, 4:43 PMbattk
12/23/2021, 4:43 PMpen one
12/23/2021, 4:48 PMbattk
12/23/2021, 4:49 PMbattk
12/23/2021, 4:49 PMZoran R-DATAGRAM
12/23/2021, 5:21 PMpen one
12/23/2021, 8:14 PMfunction _get(context) {
doValidation([context.recordtype, context.id], ['recordtype', 'id'], 'GET');
return JSON.stringify(record.load({
type: context.recordtype,
id: context.id
}));
}
Zoran R-DATAGRAM
12/24/2021, 7:55 AMvar response = record.load(...);
return response
Zoran R-DATAGRAM
12/24/2021, 7:59 AMfunction doGet(requestParams) {
var _type = requestParams.type;
var _id = requestParams.id;
var _rec = recordModule.load({
type : _type,
id : _id
})
return _rec;
}
I use this function in my RESTlet for getting one record of any record type