You need to sign in to do that
Don't have an account?
Invalid parameter for function URLFOR Error
I have created 2 data objects for Master & Detail (named Person & Car) with ID & Name fields/columns in each of them. Then i have created a MasterDetail Relation for in Car for Person so a Person can have multiple cars.
Here is the error i get in Visual Force Page and i have been stuck on this for a while if anyone can help it will be appreciated:
Invalid parameter for function URLFOR
Error is in expression '{!URLFOR($Action.Car__c.View,PC.Name)}' in component <apex:outputLink> in page personcarmasterdetail
And here is my VF Page:
<apex:page standardController="Person__c" id="thePage">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Person__c.ID__c}">
</apex:inputField>
<apex:inputField value="{!Person__c.Name__c}">
</apex:inputField>
</apex:pageBlockSection>
<apex:pageBlockTable value="{!Person__c.Cars__r}" var="PC" title="Cars" >
<apex:column headerValue="Car ID">
{!PC.ID}
</apex:column>
<apex:column headerValue="Car Name">
<apex:outputLink >
{!URLFOR($Action.Car__c.View,PC.Name)}"
</apex:outputLink>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
<!-- <apex:relatedList list="Cars__r"/> -->
</apex:page>
Please help.
Thanks
Sai
Try this:
<apex:outputLink value="{!URLFOR($Action.Car__c.View,PC.Name)}">View
</apex:outputLink>