April 2, 2020

Something has gone wrong. Cannot read property 'get' of undefined

Make sure get() in the JAVASCRIPT doesn't having undefined value. Check the condition before using get().

Sample Code:

var contractNo = component.find("contractNo");
var contractNoValue = contractNo.get("v.value")

In the above code, there should be a component with id "contractNo", else we will get this error.

No comments:

Post a Comment