Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Values list value via custom object error

DanielComeau
Contributor III

Hello,

 

We used to be able to get a value from a values list field with the below line:

$.parseJSON($('input[id*="f18514c"]".val())

however, this no longer works after updating our environment to 6.8 p2, we get this error now:

Unexpected end of json Input

Has anyone had this same error or know how to remediate? 

5 REPLIES 5

DavidFreeman
Archer Employee
Archer Employee

Is that your entire code as the parens don't match.

Hi David,

 

Sorry here is the full line:

rootCauseValue = $.parseJSON($('input[id*="f18514c"]').val());

Daniel, if the record is in view mode or the field is calculated the "value" of the values list won't be in JSON format.

 Advisory Consultant

Hey David,

 

So we have found out that when the field doesn't have a value, it will create this error, which was not present in 6.4

Looks like the way the field contains a null value was changed in later versions.  You'll have to test for a value first before using the .parseJSON

 Advisory Consultant