function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nitin SharmaNitin Sharma 

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.

Ajit Kumar 19Ajit Kumar 19
Create a java script detail page button on account  and put this code"/006/e?opp11=Prospecting");

Note : this is my custome url for creating a new Opportunity -  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"/006/e?opp11=Prospecting&opp9=123"); here opp9 is Amount to get the field id's open the below link :

Nitin SharmaNitin Sharma
How i can get field is for custom object?
Ajit Kumar 19Ajit Kumar 19
Its very simple go to your desired object and click on the desired field which you want to pre-populate and check your browser url 

for example :

So this is field id = 00N28000001 use this.

and do select it as best answer if it helped you.