I have a custom object, Site, with an action that creates a new child record, Holiday, for a Site. I have a Visualforce page that uses the Site standard controller to display a limited subset of Site fields. I'd like to make use of that action in the Visualforce page. Is there a way to surface an object's actions in a Visualforce page? I tried the following,
<apex:commandButton action="{!New_Holiday}" value="New Holiday" id="theButton"/>
but I'm getting an "unknown method..." error which makes me think I'd need to make a controller extension (and code for the action). I can created the extension if that's how I need to do this, but I'm hoping to find a way to use an existing action.
I've found plenty of info about using visualforce pages as actions, but nothing yet about surfacing actions in VF pages.
Note: I'm mainly intending this for use in Salesforce1, but it won't bother me if this action is available in regular Salesforce and Salesforce1.
Edited to add The following code works:
<apex:commandButton action="{!URLFOR($Action.SiteProgram__c.New_Holidaybtn)}" value="Create New Holiday" id="whatevs"></apex:commandButton>
It appears that object-specific actions are not accessible via $Action, but buttons and links are.