Forums | Back to Concur Developer Center

Entry Custom Field can not be updated


#1

Hello.

I want to update the value of Custom 1 - Custom 20 of Entry, but if I give JSON Object update will fail.

curl -X PUT --header “Content-Type: application/json” --header “Accept: application/json” --header “Authorization: OAuth xxxxxxxxxxxxx=” -d “{
“ReportID”: “5908E27BED4C4C1AB3D5”,
“ReportOwnerID”: "xxxxx@yyy.jp”,
“ExpenseTypeCode”: “TAXIX”,
“ExpenseTypeName”: “Taxi”,
“SpendCategoryCode”: “GRTRN”,
“SpendCategoryName”: “Ground Transportation”,
“PaymentTypeID”: “gWvwBcbbSdKi$pR0hbhJB0o1EMm01L”,
“PaymentTypeName”: “Cash”,
“TransactionDate”: “2016-04-19T00:00:00”,
“TransactionCurrencyCode”: “JPY”,
“TransactionAmount”: 1180,
“ExchangeRate”: 0.00922629,
“PostedAmount”: 10.89,
“ApprovedAmount”: 10.89,
“LocationName”: “”,
“IsPersonal”: false,
“IsBillable”: false,
“IsPersonalCardCharge”: false,
“HasImage”: true,
“IsImageRequired”: false,
“ReceiptReceived”: false,
“TaxReceiptType”: “N”,
“ElectronicReceiptID”: null,
“CompanyCardTransactionID”: null,
“TripID”: null,
“HasItemizations”: false,
“AllocationType”: “N”,
“HasAttendees”: false,
“HasVAT”: false,
“HasAppliedCashAdvance”: false,
“HasComments”: false,
“HasExceptions”: true,
“IsPaidByExpensePay”: false,
“EmployeeBankAccountID”: null,
“Journey”: null,
“LastModified”: “2016-12-22T12:03:46.193”,
“FormID”: “gWlOO$pLhoTcp0$pBfsOrOIQ10WpjG3NUAgJw”,
“Custom7”: {“Type”:“Text”,“Value”:“value”},
“ID”: “gWh7NicaxqVOaE4MCV8UjnVQSh3h39pmhKQ”,
“URI”: “https://www.concursolutions.com/api/v3.0/expense/entries/gWh7NicaxqVOaE4MCV8UjnVQSh3h39pmhKQ
}" “https://www.concursolutions.com/api/v3.0/expense/entries/gWh7NicaxqVOaE4MCV8UjnVQSh3h39pmhKQ

Response Body
{
“Message”: “Unexpected character encountered while parsing value: {. Path ‘Custom7’, line 52, position 18.\r\nAfter parsing a value an unexpected character was encountered: :. Path ‘Custom7’, line 52, position 24.”
}

Thanks in advance.

Best Regards,


#2

Have you found a workaround for this? I still have not found a solution.


#3

I have found the solution for anyone who is having trouble.

To update a custom List field, use the ListItemID as the value for a Custom field (string).

For example: Custom5 = “xxxxxxxxxxxxx$xxxxxxxx” instead of Custom5 = “CODE”

You can see that the CustomField type has Type, Code, Value, and ListItemID, but you only need to use the LineItemID as the string for the field. The field should just be a string type.