cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot use Formatter property in details page

Karan_Chopra_
Active Participant
0 Kudos

Hello Experts,

I am trying to use a java script to make first letter of sentence in upper case using the formatter property by writing JS in formatter.js.

I am able to use it successfully on master page for a field value but for same field value I used in details page it is not able to fetch that string value and gives error "Cannot read property replace of 'null' ".

It looks like that value has not been initialized in details page during load of that script but same script it is very well working in Master Page!

How is that possible?

Below are the details of code, Please help.

Will reward accordingly.

formatter script

Master Page (script working correctly)

Details Page (same script failing)

Debugging error (on details page execution)


Accepted Solutions (0)

Answers (2)

Answers (2)

Karan_Chopra_
Active Participant
0 Kudos

Help required guys

Ankit_Maskara
Employee
Employee
0 Kudos

Hi K C,

Error clearly states that the value of Bname property is not getting passed to formatter function in Detail view. Can you check if property with proper data type(String) exists.

BR.

junwu
Active Contributor
0 Kudos

do you have value for Bname?

for now it is null, which cause the problem

Karan_Chopra_
Active Participant
0 Kudos

yes it has value which is also getting populated in master page and same is coming as null for this JS function when run for details page.

Without this JS it anyways returns Bname value

junwu
Active Contributor
0 Kudos

if you don't use formatter, you detail view will display the value?

Karan_Chopra_
Active Participant
0 Kudos

Yes if i dont use formatter it works perfectly fine and displays values