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
bradvoybradvoy 

GetRecordIds() with a custom button

I have a custom button that is displayed on Account list views.  When this button is clicked, I want to pass the list of selected records to a page on my site that will process the selected records and then display results.  If I set the Behavior for my custom button to "Execute Javascript" then I can use the GETRECORDIDS() function to get the set of selected records.  I can pass the record set to the page on my site via an XML call, but this doesn't let me display the results.  I can pass the record set to the page on my site via window.location.href, but then the results page won't be displayed within the Salesforce frame (i.e. with the Salesforce header and sidebar).
 
If I set the Behavior for my custom button to "Display in existing window with sidebar" and set Content Source to URL, I can call the page on my site and have the results displayed within the Salesforce frame.  But in this case the GETRECORDIDS() function doesn't work, so I can't pass the set of selected records to my page. 
 
Is there any way to accomplish what I'm trying to do here?
AkiTAkiT
Did you ever solve this?

I am having the same problem.
Daniel BallingerDaniel Ballinger

Any luck with this?

 

When I use {! GETRECORDIDS( $ObjectType.Lead )} in the URL of a custom link button I get the following in the URL:

 

getRecordIds(%2700Q%27)

 

As far as I can tell there isn't a join function that I can use to build the resulting string array into the URL.