function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CharlesDouCharlesDou 

Read/Unread Opportunity

Hi Guys,

 

I am trying to develop a VF page that lists all the unread opportunities. Once the Opportunity is read, remove it from the list. Is there any way to do with that?

 

Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
Avidev9Avidev9

Like I said you will have a VF page that will be added as inline VF to standard layout. 

 

<apex:page standardcontroller="Opportunity" extenstions="OppEXT" action="{!updateOpp}">

 

 

So whenever this VF page is opened "updateOpp" will be automatically called and you can do the update from the same. 

All Answers

Avidev9Avidev9

Well what you can do is

  • create a new field say "isRead__c" in opportunity.
  • Create a visualforce page, when this page is opened it will just update this field to true
  • include this page in the standard page layout of opportunity
  • Create a list views "Read", add a filter isRead__c == true
  • Another list view "New" , add a filter isRead__c == false

 

CharlesDouCharlesDou

Thanks for the solution. But how do I update a field while an opportunity is open?

Avidev9Avidev9

Like I said you will have a VF page that will be added as inline VF to standard layout. 

 

<apex:page standardcontroller="Opportunity" extenstions="OppEXT" action="{!updateOpp}">

 

 

So whenever this VF page is opened "updateOpp" will be automatically called and you can do the update from the same. 

This was selected as the best answer
CharlesDouCharlesDou
I get your idea. Thanks.