You need to sign in to do that
Don't have an account?
Gaston Lefer
How do you use the code below to retrieve the current userid
1var userId =$A.get("$SObjectType.CurrentUser.Id");
2Console.log(userId);
2Console.log(userId);
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hope this helps, Mark this as a best answer if you feel.
You'll first have to set an attribute in your component like so:
Then in your actual controller/helper method you will need to set the attribute we have in the component(named userId) to the value which you have stored in the userId variable, like so:
Then, back in your component you can now display the attribute variable like so:
Let me know if that answers your question!
This goes in the doinit function? where?