User u = [SELECT Id,ContactId,Contact.AccountId FROM User WHERE Id = :UserInfo.getUserId()];
id conid=uContactId;
id acid=u.Contact.AccountId;
this are possible or not, please anybody help me
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityUser u = [SELECT Id,ContactId,Contact.AccountId FROM User WHERE Id = :UserInfo.getUserId()];
id conid=uContactId;
id acid=u.Contact.AccountId;
this are possible or not, please anybody help me
Accountid and contactid are populated if you run this as a community user /portal users .For admin Users those value are null