You need to sign in to do that
Don't have an account?
tonitonitone
Help with commandButton URLFOR error
I've created a visualForce page for a custom object (SFDC_Enrollment__c) to be inserted into a section of a page layout of SFDC_Class__c (SFDC_Enrollment__c is the child of SFDC_Class__c), but the commandButton to create a new record is giving me a "Invalid parameter for function URLFOR" error
Here's the code --
Then I tried omitting the parameters, and that threw an error too, but at least it'll work if the button is clicked as a standalone VF page when not as a inset of another page layout --
Here's the code for that --
Any ideas?
Message Edited by tonitonitone on 08-08-2008 02:16 PM
Here's the code --
Code:
<apex:commandButton action="{!URLFOR($Action.SFDC_Enrollment__c.New,Id,[retURL=URLFOR($Action.SFDC_Class__c.View,Id)])}" value="New Enrollment"/>
Then I tried omitting the parameters, and that threw an error too, but at least it'll work if the button is clicked as a standalone VF page when not as a inset of another page layout --
Here's the code for that --
Code:
<apex:commandButton action="{!URLFOR($Action.SFDC_Enrollment__c.New)}" value="New Enrollment"/>
Any ideas?
Message Edited by tonitonitone on 08-08-2008 02:16 PM