You need to sign in to do that
Don't have an account?
Hari nadh babu Eluru 7
visualforce page modified recently
fetch and display students whose records modified recently in visualforce page
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Please try this code:
Vf Page:
<apex:page controller="SearchStudent">
<apex:form >
<apex:pageblock title="Recently Modified student">
<apex:pageBlockTable value="{!stu}" var="c">
<apex:column value="{!c.Name}"/>
</apex:pageBlockTable>
</apex:pageblock>
</apex:form>
</apex:page>
Apex class:
public class SearchStudent {
public List<Student> stu {get;set;}
public SearchStudent(){
DateTime dt = System.Now().addHours(-1);
stu = [SELECT Id,Name, Phone,LastModifiedDate FROM Student where LastModifiedDate=:dt ORDER BY LastModifiedDate DESC LIMIT 1];
system.debug('stu'+stu);
}
}
Hope this will help you.
Thanks.
All Answers
Please help the community to understand the requirement. Do we need to display all the records which were modified after some date. Can you elobrate what is meant by recently here.
Thanks,
Please try this code:
Vf Page:
<apex:page controller="SearchStudent">
<apex:form >
<apex:pageblock title="Recently Modified student">
<apex:pageBlockTable value="{!stu}" var="c">
<apex:column value="{!c.Name}"/>
</apex:pageBlockTable>
</apex:pageblock>
</apex:form>
</apex:page>
Apex class:
public class SearchStudent {
public List<Student> stu {get;set;}
public SearchStudent(){
DateTime dt = System.Now().addHours(-1);
stu = [SELECT Id,Name, Phone,LastModifiedDate FROM Student where LastModifiedDate=:dt ORDER BY LastModifiedDate DESC LIMIT 1];
system.debug('stu'+stu);
}
}
Hope this will help you.
Thanks.