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
Deanna Aaron 4Deanna Aaron 4 

Trying to create a basic visualforce page

Hi there,
I am trying to create a basic visualforce page. I'm a system admin and don't have any experience with visualforce.

This is the SQL Query that I'm using (I'm not sure where to insert it?):

SELECT fferpcore__Account__c, fferpcore__CustomerReference__c, fferpcore__DocumentDate__c, fferpcore__DocumentStatus__c, Total_Invoice__c, ffaci__CongaEmailStatus__c, Id FROM fferpcore__BillingDocument__c WHERE fferpcore__DocumentStatus__c = 'Complete' AND TPx_Special_Invoice__c=FALSE AND fferpcore__DocumentType__c ='Invoice' AND ffaci__CongaEmailStatus__c != 'Sent' LIMIT 999

 

Another user said to:

Step1:- Create an apex class that retrieves records from a SOQL query
Step2:- Create a Visualforce page to display the results returned from this SOQL query

create Apex class from developer console and use the below code:-

public with sharing class TestDisplayQueryList{
public List<Account> Records {get; set;}
public TestDisplayQueryList(){
Records =
[select Name, AccountNumber, CleanStatus from Account where CleanStatus='Pending'];
}
}
create Visualforce Page from Developer console and use the below code:-
<apex:page controller="TestDisplayQueryList">
<apex:pageBlock title="My Content">
  <apex:pageBlockTable value="{!Records}" var="Record">
   <apex:column >
    <apex:facet name="header">Account Name</apex:facet>
    <apex:outputText value="{!Record.Name}"/>
   </apex:column>
   <apex:column >
    <apex:facet name="header">Account Number</apex:facet>
    <apex:outputText value="{!Record.AccountNumber}"/>
   </apex:column>
   <apex:column >
    <apex:facet name="header">Clean Status</apex:facet>
    <apex:outputText value="{!Record.CleanStatus}"/>
   </apex:column>
  </apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
AbhinavAbhinav (Salesforce Developers) 
what you want to display in vf/ bussiness requirement for this , could you please be more specific on that.
Deanna Aaron 4Deanna Aaron 4
My supervisor provided the query. In the query it says "Id FROM fferpcore__BillingDocument__c"
So it sounds like we're displaying records of Billing Documents
mukesh guptamukesh gupta
Hi Deanna,

What is your requirment, please confirm