I want to create a button on like account object and on click on that button open a new record page of opprotunity object and some field value are allready decided like state=closed won. how can i meet this req.
Create a java script detail page button on account and put this code
window.open("/006/e?opp11=Prospecting");
Note : this is my custome url for creating a new Opportunity - http://ap2.salesforce.com/006/e?retURL=%2F006%2Fo so copy you url by clicking on new opportunity in your org and make the url same as mine here opp11 is field id of stage name in opportunity if you want more records to be populated add the other fields id by puting '&' in the url like this
window.open("/006/e?opp11=Prospecting&opp9=123"); here opp9 is Amount to get the field id's open the below link :
window.open("/006/e?opp11=Prospecting");
Note : this is my custome url for creating a new Opportunity - http://ap2.salesforce.com/006/e?retURL=%2F006%2Fo so copy you url by clicking on new opportunity in your org and make the url same as mine here opp11 is field id of stage name in opportunity if you want more records to be populated add the other fields id by puting '&' in the url like this
window.open("/006/e?opp11=Prospecting&opp9=123"); here opp9 is Amount to get the field id's open the below link :
http://phollaio.tumblr.com/post/22058016777/how-to-obtain-a-field-id
for example : ap2.salesforce.com/00N28000001gmGa?setupid=AccountFields
So this is field id = 00N28000001 use this.
and do select it as best answer if it helped you.