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.
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.
I have mentioned everything correct, but still i am facing the issue, may i know if there are any trouble shooting points.
ReplyDeleteCode: Component:
js controller: var selectedSOrg = component.find("selctOrg").get("v.value");
Error is: [Cannot read property 'get' of undefined]
I think the issue is with component.find("selctOrg").
DeleteThe component is not found.