Overriding a salesforce related list "Add" button

  • 1
  • Problem
  • Updated 5 months ago
I'm trying to override the salesforce MultiAdd action for OrderItems. When I'm viewing an Order, this is the "Add Products" button on the OrderItems related list view.

So, I create my skuid page, which needs the Id of the Order as a url parameter. I have to know what the Order is to add OrderItems.

I create a Visualforce page like so:

<apex:page standardController="OrderItem"
  extensions="skuid.Redirects"
  action="{!redirect}&page=AddInvoiceServices">
</apex:page>

The standardController for the vf page has to be OrderItem if this is going to be an override for an action on an OrderItems related list.

But I need to pass an Order id, not an OrderItem id... so I get this...
Id value 8012A000000ml7y is not valid for the OrderItem standard controller 
Anyone have a good way around this?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 5 months ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
I'm pretty sure that no matter how I have the skuid model's set up, salesforce is going to pass the Order id with that override? But a vf page with a standardController for the OrderItem object can't take an Order id. How can I actually do the override, then?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
BUMP!

Surely someone has figured this out? Am I crazy?