You need to sign in to do that
Don't have an account?
Akshay Kapadia
How can I create new record for custom object from visual force page on custom button click?
Hi guys, I'm totally new to salesforce, just started. I need your help in, how can I create new record of custom obejct from visualforce page by clicking on custom button?
So I've one custom object called; 'project' and other 'mapview' and i got visualforce page attached to mapview object and in that page i have custom button, on that button click i want to create new project record. I've gone through few solutions but couldn't understand.
So posting here and asking for help.
here is what I'm doing:
<apex:page standardController="MapView__c" wizard="true" >
<apex:pageBlock >
<apex:form >
<apex:commandButton id="btnCreateProject" action="{!URLFOR($Action.MapView__c.Create_New_Project)}" value="Create a project"/>
</apex:form>
</apex:pageBlock>
</apex:page>
So I've one custom object called; 'project' and other 'mapview' and i got visualforce page attached to mapview object and in that page i have custom button, on that button click i want to create new project record. I've gone through few solutions but couldn't understand.
So posting here and asking for help.
here is what I'm doing:
<apex:page standardController="MapView__c" wizard="true" >
<apex:pageBlock >
<apex:form >
<apex:commandButton id="btnCreateProject" action="{!URLFOR($Action.MapView__c.Create_New_Project)}" value="Create a project"/>
</apex:form>
</apex:pageBlock>
</apex:page>
<apex:page standardController="MapView__c" wizard="true" >
<apex:form>
<apex:pageBlock>
<apex:pageBlockButtons>
<apex:commandButton action="{!URLFOR($Action.<ObjectName>.New)}" Value="Create a Project"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Thanks,
Sai
All Answers
<apex:page standardController="MapView__c" wizard="true" >
<apex:form>
<apex:pageBlock>
<apex:pageBlockButtons>
<apex:commandButton action="{!URLFOR($Action.<ObjectName>.New)}" Value="Create a Project"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Thanks,
Sai
Do i need to use controller?
appreciate your time.
thanks
Thanks.