i have a requirement wherein I have a button on my VF page XYZ_VF
1.The button needs to open a create record page of an custom object 2.Also when the standard create page is displayed,its lookup field should be prepopulated
How can i extend the below code to implement my functionality?
Note:I am using custom controller
below is my code:
<apex:commandButton
value="Add Killer Checks"
action="!URLFOR($Action.DisplayCheck__c.New,$CurrentPage.Name,[CF00N20000009H4jV=$CurrentPage.Parameters.vname,CF00N20000009H4jV_lkid=$CurrentPage.Parameters.id])}"
style="float:center"/>
I get the below error:
Invalid parameter for function URLFOR Error is in expression '{!URLFOR($Action.DisplayCheck__c.New,$CurrentPage.Name)}' in component in page visitaudit_vf
Please help THanks