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
AK_SmithAK_Smith 

How to reload VF frame by if condition

How to reload/rerender VF Page frame by if condition. 
If CTPHARMA__Activity__c.SF1_Status__c contains ‘in progress ’ than refresh page else do nothing 
 
​<apex:page standardController="CTPHARMA__Activity__c" id="page" docType="html-5.0">
<style>
.good{
text-align:center;
background-color: MediumSeaGreen;
font-weight: bold;
color: white;
}
.bad{
text-align:center;
background-color: Tomato;
font-weight: bold;
color: white;
}

.ugly{
text-align:center;
background-color: LightGray;
}


</style>
  
    <apex:form styleClass="{!if(CTPHARMA__Activity__c.SF1_Status__c == 'Подтвержден территориально','good',if(CTPHARMA__Activity__c.SF1_Status__c == 'Не подтвержден территориально','bad','ugly'))} ">
<apex:outputText value="{!CTPHARMA__Activity__c.SF1_Status__c}" />
    </apex:form>
</apex:page>



 
Alain CabonAlain Cabon
Hello,

Did you consider an action poller with rerender + enabled (true/false) on formula condition with CTPHARMA__Activity__c.SF1_Status__c  ?

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_actionPoller.htm

interval The time interval between AJAX update requests, in seconds. This value must be 5 seconds or greater, and if not specified, defaults to 60 seconds.

That could be interesting for long ‘in progress ’ delay.