You need to sign in to do that
Don't have an account?
Abhilash M
Hi! I am trying to print the username in a Lightning Component.The code is not working. Please fix the code.
public class OwnerController
{
@AuraEnabled
public static List<Contact> getOwner()
{
List<Contact> Owner =
[select name from user where id =: Userinfo.getUserId()].name;];
return Owner;
}
}
{
@AuraEnabled
public static List<Contact> getOwner()
{
List<Contact> Owner =
[select name from user where id =: Userinfo.getUserId()].name;];
return Owner;
}
}
Could you please show me how to run an Apex test on this code?