function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ashvin Jadhav 13Ashvin Jadhav 13 

Undefined value in JS function

Hi, 

Following error is coming when JS function performing some calculations. 
User-added image


and I have following JS code 
User-added image

Where the value of unitprice is coming as undefined which nothing but a currency type of field. 

can anyone please help me out with this. ? 

Thanks & Regards,
Ashvin
Best Answer chosen by Ashvin Jadhav 13
Alisha Mehta 9Alisha Mehta 9
Hi Ashvin,

Please try changing the 'Value' to 'value' in 2nd line -
document.getElementById(unitPriceId).value

All Answers

Alisha Mehta 9Alisha Mehta 9
Hi Ashvin,

Please try changing the 'Value' to 'value' in 2nd line -
document.getElementById(unitPriceId).value
This was selected as the best answer
Ashvin Jadhav 13Ashvin Jadhav 13
Oh yes ! 

I completely forgot that JS is case sensitive language. 

Thank you so much fo pointint that out. 

Regards,
Ashvin