You need to sign in to do that
Don't have an account?
vcv
Custom object form and list of records
Hi,
I have a beginner's problem:
I have a custom object (Candidates) with a VF page that overrides the standard form. Underneath there should be a list of records already submitted through the form. My code displays the form correctly, yet the list shows up empty. If i save a form entry, it appears in the list but disappears on refresh. Is it possible to fix this issue exclusively in VF?
Here is the code:
I have a beginner's problem:
I have a custom object (Candidates) with a VF page that overrides the standard form. Underneath there should be a list of records already submitted through the form. My code displays the form correctly, yet the list shows up empty. If i save a form entry, it appears in the list but disappears on refresh. Is it possible to fix this issue exclusively in VF?
Here is the code:
<apex:page standardController="Candidates__c"> <apex:form id="theForm"> <apex:pageBlock title="Enter candidate"> <apex:pageBlockSection columns="2"> <apex:inputfield value="{!Candidate__c.FirstName__c}"/> <apex:inputfield value="{!Candidate__c.LastName__c}"/> </apex:pageBlockSection> </apex:pageBlock> <apex:pageBlock title="List of Candidates"> <apex:pageBlockTable value="{!Candidates__c}" var="candidates"> <apex:column value="{!candidates.FirstName}"/> <apex:column value="{!candidates.LastName}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>
Try with below code which worked for me.
Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.
Best Regards,
Sandhya
All Answers
Try with below code which worked for me.
Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.
Best Regards,
Sandhya
Check If this can solve your issue:
Thank you
Ajay Dubedi
thanks for helping out - I will give it a try and mark as solved. Just another question - is there a way to simply add save button to the form AND a delete button to the list of records so that it is possible to delete a candidate?
both codes above work fine. Except some issues:
- I can add the VF page to the page tab, not the New button
- if I try to save an entry, it redirects me to the platform's first page (in my dev page) and does not show a new entry in the list of records