- From Setup in your DE org, click Create | Objects and Select any one on which you wants custom button.
- Scroll down to the Buttons, Links, and Actions section and click New Button or Link.
- In the Label field, enter "label name".
- For Display Type choose Detail Page Button.
- For Behavior choose Execute JavaScript.
- For Content Source choose OnClick JavaScript.
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}
sforce.connection.sessionId = '{!$Api.Session_ID}';
var result = sforce.connection.describeSObject("Contact");
for (var i=0; i<result.fields.length; i++) {
var field = result.fields[i];
alert(field.name);
}
No comments:
Post a Comment