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
niharnihar 

how can i add custom object fields to visual force page

Hi all,

I created an visualforce page for bulk send sms.

User-added image
    I want to insert custom object field names in the message log how        can i achieve it any suggestions

My code:
 
<apex:page standardController="Campaign" extensions="Campaignbulk"  showHeader="true" sidebar="true">
    <apex:form >        
        <apex:pageBlock id="ThePage">                       
            <apex:pageBlockSection columns="1" rendered="{!firstPanel}">                
                <apex:outputText label="Campaign Name :">
                    {!campaign.name}
                </apex:outputText>                
                <apex:outputText label="Count :">
                    {!cnt}
                </apex:outputText> 
                <apex:inputTextarea value="{!smsText }" label="Text :" html-maxLength="160" rows="5" cols="40" required="true" style="resize:none;"/>
                <apex:commandButton value="send" action="{!sendbulk}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection rendered="{!secondPanel}" >                   
                <h1>
                  "Total {!cnt} Message in queue".
                    
                </h1>
            </apex:pageBlockSection> 
        </apex:pageBlock>        
    </apex:form>   
</apex:page>



Thanks inadvance......
Pruthiviraj GanePruthiviraj Gane
===== Apex ====
public class Test {
    public pruthiviraj__myobj__c customObj{get;set;}
    public Test(){
        customObj = new pruthiviraj__myobj__c();
        customObj = [SELECT Id,Name FROM pruthiviraj__myobj__c LIMIT 1];
    }
}
======= Visualforce Page ======
<apex:page controller="Test">
    <apex:outputText label="Campaign Name :">
          {!customObj.Name}
    </apex:outputText>
</apex:page>

Let me know if this is helpful or not.