Monday, June 11, 2012

Salesforce - Custom List buttons for OpportunityLineItem

When trying to create a Visualforce Page to back a Custom List button for Opportunity Product (OpportunityLineItem) I got the following error:

Save error: List controllers are not supported for OpportunityLineItem.

From StandardController recordSetVar OpportunityLineItem issue:

"we restrict list controllers ( standardCOntroller + recordSetVar attribute) to only top-level standard and custom objects so effectively you can not create a list button to a Visualforce page for OpportunityLineItem today" Andrew, Product Manager (11-26-2008)

So that approach is out.

As I wasn't particularly interested in the specific records being selected I was able to make do with a URL content source that redirected to the required Visualforce page and passed the parent Opportunity Id.

As an aside, finding the buttons in the Related List Section required collapsing the Columns and expanding the Buttons area.

See Also:

Tuesday, June 5, 2012

Access standard Salesforce page regardless of Visualforce page overrides

If the standard Salesforce.com page has been overridden for a standard button or link you can still access it by appending nooverride=1 as a query string parameter to the url.

The Button and Link Overrides for Opportunity (pixels have been moved around)
Appended nooverride=1 for an OpportuntiyLineItem detail page.