+ Start a Discussion

string.valueof returns partial responce with '...' at the end

Hi all, 
when I write:
string ans  = string.valueOf(getUserdata(UserInfo.getUserId()));     
return ans;
and when i print to the screen the data I'm getting partial info with '...' at the end.

Anyway I can the entire answer?
3 Creeks3 Creeks
What is getUserData?  Is this your own method?   If it returns some kind of collection and the returned collection is long, Salesforce will print part of it and then put at the ... to show that it continues.

If you want to make sure all elements of a collection is printed then loop through the collection and print each element individually with the loop.

If all you want is to print the current user's Id, just use UserInfo.getUserId() on its own.