You need to sign in to do that
Don't have an account?
Amita Tatar
Setting default value for start date on edit page
Hi guys,
i have a requirement where i want to set default date as today's date on order object start date field. How can i do that? Can u please help?
i have a requirement where i want to set default date as today's date on order object start date field. How can i do that? Can u please help?
Put code in Controller
public Object edc{get;set;}
Controller(){
edc.Date__c=System.today();
}
Vfpage
<td > <apex:inputField value="{!edc.Date__c}" /></td>
If you want to put when page is edited, put code in edit method
Hope this will be help you!!!
I want this for standard order page layout .I to set default value for the field Order Start Date on order page layout
Orderstartdate is standard required field of order object. you cannot make its default.
Is there any way to remove the field from layout? So that i can create a custom field and set a default value for it?
1. Create a new VF Page with the below code : This assumes:
a. You are using standard Order Object and "Order Start Date" field.
b. You need to change the "action=" part as per your org details (/801/e would be the part where you click on New button from the Order tab, EffectiveDate should be same if youa re using standard field. Change the "retURL=" part as well to redirect to the New Order creation page).
2. Override your standard "New" button using this page created above.
Let me know if this works for you!