You need to sign in to do that
Don't have an account?
sheraz
help for field align in visual force page
hi,
I am new to salesforce and i need help for the following in visualforce page:
- how to Add a ‘Cancel’ button in vf page
- how to align fields in vf page.
- I create this page on opportunites object and i want the header should be displayed on the product selected by user. Ex: Ret should say ‘Ret process’ name
please help me for this.
thanks
1. To add cancel just add <apex:commandButton value="Cancel" action="{!cancel}"/> to your visualforce page.
2. To align fields, use <apex:pageBlock><apex:pageBlockSection><apex:pageBlockSectionItem>
3. I am not sure I understand your question, please elaborate. For header generally, try using <apex:sectionHeader>
You try this, I think u r reqirement like this only i hope it helpful,
<apex:page standardController="Opportunity" extensions="practice6">
<apex:form >
<apex:pageBlock title="{!username} Process">
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!Save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Opportunity">
<apex:inputField value="{!Opportunity.Name}"/>
<apex:inputField value="{!Opportunity.stageName}"/>
<apex:inputField value="{!Opportunity.CloseDate}"/>
<apex:inputField value="{!Opportunity.Amount}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
public class practice6 {
public string username{get;set;}
public practice6(ApexPages.StandardController controller) {
username=UserInfo.getFirstName();
}
}
thanks for your help.
i still have issue that i cant working the header information depend on "Product" selected by user. can i use out of box object field referenced in custom object? I have custom object where i am creating new VF page but i want to reference the header name from opportunity object field.
please help me
thanks
Sorry i am not able to understand your point.
can i use out of box object field referenced in custom object?
Whatever you want you can get easily by using Merge field from VF page
"{!username}
In Class you need to take that field using Query. Then return that field ..
I have custom object where i am creating new VF page but i want to reference the header name from opportunity object field.
You mean you want Label Name or Field Value?
Field value means how can you get before creating a Record. (or) from which record you need to get value.
If you want field Label Name means you can get like this link
http://boards.developerforce.com/t5/Apex-Code-Development/How-to-get-the-label-Names-for-Object-s-field/td-p/386241
regards
Prem