You need to sign in to do that
Don't have an account?
SalesforceLearner
Lightning component to display login partner user Accounts
How to display the currently logged in partner user accounts on Lightning component ?
I am using below code but it is not working
public class AccountInformation {
@AuraEnabled
public static List<Account> getAcc() {
ID contactId = [Select contactid from User where id =: Userinfo.getUserid()].contactId;
ID AccID = [Select AccountID from Contact where id =: contactid ].AccountId;
return [SELECT Id, name, Industry FROM Account where Id =: AccID ];
}
}
I am using below code but it is not working
public class AccountInformation {
@AuraEnabled
public static List<Account> getAcc() {
ID contactId = [Select contactid from User where id =: Userinfo.getUserid()].contactId;
ID AccID = [Select AccountID from Contact where id =: contactid ].AccountId;
return [SELECT Id, name, Industry FROM Account where Id =: AccID ];
}
}
Also, when you post any sort of code, formula, VF or lightning markup, please utilize the code format button (< >). Thank you.