You need to sign in to do that
Don't have an account?
Shekhar 13
Records not getting created in Account & Opp object in Visualforce page
Helo All ,
Please note I am using standard controller for account object in VF page and the code gets saved means there is no error , but when I enter the values in the fields the record is not getting inserted , meaning I am not able to create account record . Even I have tried with opportunity object also Iam not able to create opp record.
Kindly advice how this problem can be solved .
Please note I am using standard controller for account object in VF page and the code gets saved means there is no error , but when I enter the values in the fields the record is not getting inserted , meaning I am not able to create account record . Even I have tried with opportunity object also Iam not able to create opp record.
Kindly advice how this problem can be solved .
Can you share your code snippet?
Please check the below code
<apex:page standardController="Account">
<apex:form >
<apex:pageBlock title="My Content " mode="edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save "/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="My Content Section" columns="2">
<apex:inputField value="{!account.name}"/>
<apex:inputField value="{!account.site}"/>
<apex:inputField value="{!account.type}"/>
<apex:inputField value="{!account.accountnumber}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
I tried your code in my org and it's working fine. I think you are recieving some backend exceptions from validation rule or apex trigger.
Add the <apex:pageMessages/> tag in your VF page so it will display the error in UI.
Thanks,
Maharajan.C
It worked with the same code actually I changed the browser .
Thanks
Shekhar