if(User.FirstName != NULL && User.MiddleName != NULL && User.LastName != NULL) {
User usr = [SELECT FirstName,MiddleName,LastName FROM User WHERE
id=:userinfo.getuserid()];
System.debug('from if FirstName '+usr.FirstName);
System.debug('from if MiddleName '+usr.MiddleName);
System.debug('from if LastName '+usr.LastName);
}
Even, if FirstName & MiddleName are NULL, execution enters if loop. Why does this happen?
User
?