Below is the scenario which I need to handle

I would like the ability to mark leads as "read". There are instances where the sales team has acted on the lead but not via Salesforce. Is there a way I can simply go in and mark the lead as read instead of having to ask them to do so? I do not want the system to automatically change the status of leads that are not mine simply by opening them

Any ideas how shall we achieve this?

  • What is "Read"? is it custom field that you added? did you tried anything?what is problem that you are facing? – AtulRajguru9 Sep 2 '15 at 8:17
  • It's a standard status. – Robin De Bondt Sep 2 '15 at 9:06
  • In order to be able to help you we need to know how you expect Salesforce to know that a lead was handled outside of salesforce. Do you have an integration, something sent to salesforce once the lead is handled outside of salesforce? If you do not have a way to let SF know the lead was handled elsewhere you will have to do it manually. – Eric Sep 2 '15 at 14:30

You can just update the field IsUnreadByOwner to false. Something like this:

List<lead> leadsToMarkAsRead = [select id, IsUnreadByOwner from lead where id in:leadIdList];
for(Lead l: leadsToMarkAsRead){
    l.isUnreadByOwner = false;    
update leadsToMarkAsRead;

where leadIdList is a list of lead IDs to be marked as read.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.