In my object manage runder User I have a custom field named Business Type, in my apex class I want to retreive the current logged in users Business Type. It can only be Commerical Or Residential. I do:

public static user getBusinessType(){
    return [Select Business_Type__c From User Where Id = :UserInfo.getUserId()];

This succesfully runs but it doesnt say Commercial or Residential it returns:

    id: "[somerandomnumer]"

How can make it so it gets the current user business type?


1 Answer 1


Once i checked on other test users this issue was fixed. Checking on system admin returned null which was what is was supposed to do.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .