0

I have a requirement to have a custom button on Account detail page. A click on that should show all available records for logged in User of a custom object Approved_Documents_vod__c. This object has no direct relation with Account. Please let me know if that is possible without any visualforce page.

3

Please create a Custom button on the Object where you want to show all records and below is the Code for the custom button:

{!REQUIRESCRIPT("/soap/ajax/32.0/connection.js")} 

// Quering the database and Example Query and you can modify it as per your requirement

var result = sforce.connection.query("Select ID From Opportunity"); 

// Getting all records from the query to the array 
var records = result.getArray("records"); 

alert(records);

Note: You don't have to write any visualforce page and there is no relation between the objects.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.