My custom button works in normal Salesforce UI, but not working in Customer Portal.
OnClick JavaScript:
var contactIds = {!GETRECORDIDS($ObjectType.Contact)};
if (contactIds.length != 2) {
alert("Exactly 2 Contact records are to be selected");
} else {
alert("Okay");
}
Why is this only working in Salesforce UI and not in Customer Portal? On clicking the custom button, how to get IDs of checked/ticked records, from list view, in Customer Portal?

contactIds.lengthcan detect exactly how many checkboxes are checked, even if they are checked in different pages of the List View. However, in Customer Portal,contactIds.lengthis always zero, irrespective of the number of checkboxes checked; therefore, the flow in Customer Portal is always entering theifblock. – Suman Krishna Saha Jan 14 at 13:15