You need to sign in to do that
Don't have an account?
sreeja
how to save in the database with customobject
<apex:page standardController="Companies__c" sidebar="false"> <apex:sectionHeader title="Company Information" help="Help for this page" /> <apex:form > <apex:pageBlock title=" cmp Information" tabStyle="Account" > <apex:pageBlockButtons > <apex:commandButton value=" Save " action="{!save}" /> <apex:commandButton value=" Cancel " action="{!cancel}" /> </apex:pageBlockButtons> <apex:pageBlockSection columns="2" > <apex:pageBlockSectionItem > <apex:outputLabel value="Company Name" /> <apex:inputfield value="{!Companies__c.name}" /> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Company phone" /> <apex:inputText value="{!Companies__c.cmpanies_phone__c}" /> </apex:pageBlockSectionItem> </apex:pageBlockSection> <!--contact Information--> <apex:pageBlockSection columns="2" title="Contact Information"> <apex:pageBlockSectionItem > <apex:outputLabel value="Contact Person"/> <apex:inputfield value="{!Companies__c.Contact_Person__c}" /> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Contact's Email Address" /> <apex:inputText value="{!Companies__c.Contact_s_Email_Address__c}" /> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>i had created a custom filed and a custom object and i had created a visualforce page, if i had saved the record ,it is not getting save , may i know the error in that???
Please copy and paste below code It's working fine.
If you understand this Please give the best answer.
Thanks
Mohd Rais
Your code looks good.There is no bug in the code.
Are you getting any error??
Thanks
thanks and regards
ramya