• Rifleman
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies

In my controller, I have this function, which calls a utility function to get all subordinate users to the currently logged in user:

public string getUsers() {

Set<Id> userlist = new Set<Id>();
userlist.add(UserInfo.getUserId());
userlist.addAll(RoleUtils.getRoleSubordinateUsers(UserInfo.getUserId()));

String retValue = ':All;';
Integer iCount = 0;

for (User usr: [select Name from User where Id in :userlist and isActive = true and Employee_Group__c like '%Sales%' order by Name]) {
retValue += usr.Name + ':' + usr.Name;

iCount++;

if (iCount < userlist.size()) {
retValue += ';';
}
}

return retValue;
}

 

How can I display the retValue, which is the list of users, in a SelectList on my VFPage?  I imagine this is a fairly easy answer, but I just got handed a project and I've just started learning VF.  Thanks for your help!

Is there a way to add a button or something to a visualforce page that will allow a user to select other users to follow that record in chatter?  For example, I'm working a case and I want Bob to follow the case, so I'd click a button and a user lookup would popup, letting me select Bob and then add him as a follower to that record.

 

Thanks,

We've written an apex class that uses an email service to ingest an email, parse it and populate an object record.  The body of the email is displayed to our end users in the object as a rich text area.  However, when they open the object record, the body of the email is run together, disregarding the carriage returns in the original inbound email.  We created a test field that was a regular text area and when we populate it, carriage returns are maintained.  


Essentially, this is what happens:

Original email body:

Hi,

How are you?

Doing great here!

Sincerely,

Tom

 

Rich Text Area:

Hi,How are you?Doing great here!Sincerely,Tom

 

Normal Text Area:

Hi,

How are you?

Doing great here!

Sincerely,

Tom

 

Does anyone have any idea as to how to fix this issue?  Changing the rich text area to a normal text area is not an option.

 

Thanks


In my controller, I have this function, which calls a utility function to get all subordinate users to the currently logged in user:

public string getUsers() {

Set<Id> userlist = new Set<Id>();
userlist.add(UserInfo.getUserId());
userlist.addAll(RoleUtils.getRoleSubordinateUsers(UserInfo.getUserId()));

String retValue = ':All;';
Integer iCount = 0;

for (User usr: [select Name from User where Id in :userlist and isActive = true and Employee_Group__c like '%Sales%' order by Name]) {
retValue += usr.Name + ':' + usr.Name;

iCount++;

if (iCount < userlist.size()) {
retValue += ';';
}
}

return retValue;
}

 

How can I display the retValue, which is the list of users, in a SelectList on my VFPage?  I imagine this is a fairly easy answer, but I just got handed a project and I've just started learning VF.  Thanks for your help!

Is there a way to add a button or something to a visualforce page that will allow a user to select other users to follow that record in chatter?  For example, I'm working a case and I want Bob to follow the case, so I'd click a button and a user lookup would popup, letting me select Bob and then add him as a follower to that record.

 

Thanks,

I have a text formula to which I would like to add a carriage return/line break.  I tried concatenating chr(13) and chr(10), but the validation didn't like it.  Is this possible?