You need to sign in to do that
Don't have an account?
sunny_mhl10@yahoo.com
Fields Information on clcik of Custom Button
Hi
I have custom object with 2-3 fields . On click of Custom button on that object i want to get details of information of data entered in that record in an array or json object.
Thanks
Hi,
Create a custom button in your object. Follow the below steps:
Select Display Type= Detail Page Button
Behavior=execute JavaScript and Content Source=on click JavaScript
{!REQUIRESCRIPT("/soap/ajax/14.0/connection.js")}
var result = sforce.connection.query("Select o.Type, o.StageName, o.Amount, o.AccountId From Opportunity o WHERE o.Id = {!Opportunity.Id}'");
var newOpp = result.getArray("records");
alert(newOpp);
After creating the button add the custom button in the page layout.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
All Answers
Hi,
Try the below code snippet as reference:
{!REQUIRESCRIPT("/soap/ajax/14.0/connection.js")}
var result = sforce.connection.query("Select o.Type, o.StageName, o.Amount, o.AccountId From Opportunity o WHERE o.Id = {!Opportunity.Id}'");
var newOpp = result.getArray("records");
alert(newOpp);
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Dear navatar
Where i should write tis code.
Thanks
Hi,
Create a custom button in your object. Follow the below steps:
Select Display Type= Detail Page Button
Behavior=execute JavaScript and Content Source=on click JavaScript
{!REQUIRESCRIPT("/soap/ajax/14.0/connection.js")}
var result = sforce.connection.query("Select o.Type, o.StageName, o.Amount, o.AccountId From Opportunity o WHERE o.Id = {!Opportunity.Id}'");
var newOpp = result.getArray("records");
alert(newOpp);
After creating the button add the custom button in the page layout.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.