You need to sign in to do that
Don't have an account?
getUserInfo() method error
public class ToKnowUserInfo{
public void doGetUserInfo() {
try {
GetUserInfoResult result =connection.getUserInfo();
System.out.println('\nUser Information');
System.out.println('\tFull name: ' + result.getUserFullName());
System.out.println('\tEmail: ' + result.getUserEmail());
System.out.println('\tLocale: ' + result.getUserLocale());
System.out.println('\tTimezone: ' + result.getUserTimeZone());
System.out.println('\tCurrency symbol: ' + result.getCurrencySymbol());
System.out.println('\tOrganization is multi-currency: ' +
result.isOrganizationMultiCurrency());
} catch (ConnectionException ce) {
ce.printStackTrace();
}
}
}
While i compile this code i get error
"Error: Compile Error: Invalid type: GetUserInfoResult at line 5 column 7" what is the reason ............knoe any ple tell me
thank u
you have to use System.debug(), java doesn't work for apex
Cheers!
V
Try using the content assist to select "GetUserInfoResult" this will import the necessary files
But if you are not sure about the namespace Eclipse has a content assist feature, which gives you suggestion based on what you type in. We generally use "CTRL + SPACE" to invoke the same. When you select the required class from the content assist all the dependencies are automatically imported into your project