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
Force.platformForce.platform 

table and other fields

Hello All,
        I am new to salesforce, my requirment is, i have pageBlockTbale that recive data from user and i have anather two text and textArea field outside of table that fields also recive user input. n i want to save all data in one object when user click on save button. how can we do this?
Ajay K DubediAjay K Dubedi
Hi Arati,
For this you need to create a apex controller for your page and use getter and setter functions in your controller.
By this you need to set the same variable name in the value attribute of your text and text area input fields.
For save button create a save() method in controller and add this in page
<apex:commandButton action="{!save}" value="save"/>
Input text e.g.
<apex:inputText value="{!varName}"/>

In controller:-
public string varName{get;set;}

public void save()
{
//Code
}

Thanks
Ajay​​