- Hari nadh babu Eluru 7
- NEWBIE
- 80 Points
- Member since 2021
-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
8Questions
-
4Replies
result was not getting in another page
VF code Page1
<apex:page controller="M_R_Another"> <apex:form > <apex:pageBlock title="Recently Modified"> <apex:commandButton value="Click Me" action="{!RM}"/> </apex:pageBlock> </apex:form> </apex:page>Apex code Page 1
public class M_R_Another { public PageReference RM() { PageReference pageRef = new PageReference('https://93com4-dev-ed--c.visualforce.com/apex/M_R_Another2?mrp='+RM); return pageRef; } }VF Code Page 2
<apex:page controller="M_R_Another2"> <apex:form > <apex:pageBlock > <apex:pageBlockTable value="{!n}" var="g"> <apex:column value="{!g.Name}"/> <apex:column value="{!g.LastModifiedDate}"/> <apex:column value="{!g.Student_Id__c}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>Apex code Page 2
public class M_R_Another2 { public list<Student__c> n { get; set; } public M_R_Another2(){ string m = ApexPages.currentPage().getParameters().get('mrp'); n = [SELECT Student_Id__c,Name, LastModifiedDate FROM Student__c ORDER BY LastModifiedDate DESC]; } }And also getting Error below image is the error getting in page 1
- Hari nadh babu Eluru 7
- December 12, 2021
- Like
- 0
- Continue reading or reply
picklist select option
take a picklist which is having options male,female,others. if user select male and click button then show male students only in vf page
<apex:page controller="ChooseGender"> <apex:form > <apex:selectList id="ChooseGender" value="{!CG}" size="1"> <apex:selectOption itemValue="Male" itemLabel="Male"/> <apex:selectOption itemValue="Female" itemLabel="Female"/> <apex:selectOption itemValue="Others" itemLabel="Others"/> </apex:selectList> <apex:commandButton value="Click me" action="{!PSO}"/> </apex:form> </apex:page>
- Hari nadh babu Eluru 7
- December 09, 2021
- Like
- 0
- Continue reading or reply
Visualforce page records modified recently output not getting blank page getting
VF code
fetch and display students whose records modified recently
in visualforce page
<apex:page controller="Created_Recently"> <apex:form > <apex:pageblock title="Recently Modified student"> <apex:pageBlockTable value="{!stu}" var="c"> <apex:column value="{!c.Name}"/> <apex:column value="{!c.LastModifiedDate}"/> <apex:column value="{!c.Student_Id__c}"/> </apex:pageBlockTable> </apex:pageblock> </apex:form> </apex:page>Apex code
public class Created_Recently { public List<Student__c> stu {get;set;} public Created_Recently(){ DateTime dt = System.Now().addHours(-1); stu = [SELECT Student_Id__c,Name, LastModifiedDate FROM Student__c where LastModifiedDate=:dt ORDER BY LastModifiedDate DESC LIMIT 1]; system.debug('stu'+stu); } }
fetch and display students whose records modified recently
in visualforce page
- Hari nadh babu Eluru 7
- December 08, 2021
- Like
- 0
- Continue reading or reply
starts with s in visual force
In search box if user enter a letter 's' then bring students name starts with s. In visualforce
- Hari nadh babu Eluru 7
- December 08, 2021
- Like
- 0
- Continue reading or reply
visualforce page modified recently
fetch and display students whose records modified recently in visualforce page
- Hari nadh babu Eluru 7
- December 08, 2021
- Like
- 0
- Continue reading or reply
Records between Min and Max of age field
If user enter min age, max age . fetch all the students in between that min and max age
- in above example try to load students in ascending order based on age
- Hari nadh babu Eluru 7
- December 08, 2021
- Like
- 0
- Continue reading or reply
Getting Error in the above code
Date myOldDate = Date.newInstance(2021, 1, 1); Date myTodayDate = date.today(); List<Student__c>studentList = new List <Student__c>(); studentList = [SELECT Student_Id__c, Name, Joining_Date__c FROM Student__c WHERE Joining_Date__c >: myOldDate AND Joining_Date__c :<= myTodayDate];In this above code i had getting this below error
The error is appeared at in "studentList =" on here at in equalto symbol. Please resolve my problem. Thank you !
- Hari nadh babu Eluru 7
- December 04, 2021
- Like
- 0
- Continue reading or reply
diagonal length of rectangle
write the apex class to define diagonal length of rectangle formula to substitute values formula is
- Hari nadh babu Eluru 7
- November 30, 2021
- Like
- 0
- Continue reading or reply
starts with s in visual force
In search box if user enter a letter 's' then bring students name starts with s. In visualforce
- Hari nadh babu Eluru 7
- December 08, 2021
- Like
- 0
- Continue reading or reply
visualforce page modified recently
fetch and display students whose records modified recently in visualforce page
- Hari nadh babu Eluru 7
- December 08, 2021
- Like
- 0
- Continue reading or reply
Records between Min and Max of age field
If user enter min age, max age . fetch all the students in between that min and max age
- in above example try to load students in ascending order based on age
- Hari nadh babu Eluru 7
- December 08, 2021
- Like
- 0
- Continue reading or reply
diagonal length of rectangle
write the apex class to define diagonal length of rectangle formula to substitute values formula is
- Hari nadh babu Eluru 7
- November 30, 2021
- Like
- 0
- Continue reading or reply