+ Start a Discussion
Shweta Choudhary 17Shweta Choudhary 17 

How to Create an inline Vf page that shows the message(Close date is near) on opportunity when a particular opportunity's close date is 5 days ahead.

Suraj Tripathi 47Suraj Tripathi 47
Hi Shweta Choudhary 17,
<apex:page standardController=”opportunity” extensions=”oppdate”>
<apex:sectionHeader title=”opportunity close date “/>

<apex:outputpanel rendered=”{!flag}” >you have closed it near by </apex:outputpanel>


public class oppdate {

public string abc{get;set;}

public boolean flag{get;set;}

public oppdate(ApexPages.StandardController controller) {


String abc = controller.getId();

opportunity oppobject =[SELECT id,CloseDate FROM opportunity where id = :abc];

if(oppobject.CloseDate >= Date.Today() && oppobject.CloseDate<= Date.Today().addDays(4))






This might Help you
If you find this helpful mark it as the best answer.
Thanks And Regards,
Suraj Tripathi.
Haylie TurcotteHaylie Turcotte
 Expand my knowledge and abilities. Actually the article is very real.
onevanilla (https://www.onevanilla.run/)