Geeting error while clicking on UI Action "A JSONObject text must begin with '{' at character 0 of"

janvibaJhala
ServiceNow Employee
ServiceNow Employee

Geeting error while clicking on UI Action "A JSONObject text must begin with '{' at character 0 of" in workspace.

 

I used the "action bar" component for my custom record page, using the preset "record action" in the action bar configuration.

2 REPLIES 2

Abhay Kumar1
Giga Sage

@janvibaJhala I have seen this error when stringify JSON that time data is not in Jason format instead would be string.

Make sure the response format is JSON by using JSON.stringify() before returning if you’re dynamically building a response.

 

@Abhay Kumar1 When I click on any UI action like "Save" or "Change Level"(Custom action), it gives me the same JSON error. So, where do I need to stringify the response, as in my UI actions, I am updating the table field value?