You need to sign in to do that
Don't have an account?
kostya_de
parameters for URLFOR function (Action.New)
I need to create VF page with button which creates new element related to current and add it to list. I want to fill automatically master field and maybe some additional fields.
Can I extend code below some how to make it?:
<apex:commandButton action="{!URLFOR($Action.CF_OtherOp__c.New)}" value="new bussines opportunity"/>
If not how its possible to implement?
Thanks,
Kostja
You sure can... use something like this:
{!URLFOR( $Action.CF_OtherOp__c.New,null,[EXAMPLE15CHARID=Record.Name, EXAMPLE15CHARID_lkid=Record.Id, PARAMETER2=SOMEVALUE, PARAMETER3=SOMEVALUE])}
All Answers
You sure can... use something like this:
{!URLFOR( $Action.CF_OtherOp__c.New,null,[EXAMPLE15CHARID=Record.Name, EXAMPLE15CHARID_lkid=Record.Id, PARAMETER2=SOMEVALUE, PARAMETER3=SOMEVALUE])}
thank you, but how I can obtain Field ID. I copied/pasted field Id from url of field view page:
{!URLFOR($Action.CF_OtherOp__c.New, null, [00NT00000012yJJ=Record.Name, 00NT00000012yJJ_lkid=Record.Id])}
But got the error:
Error: Syntax error. Found '['
Is it possible to get ID of necessary field in general and how to apply it to this case?
It looks like you are trying to link into the standard page passing in values as request parameters. This is not a supported API and is subject to change/break at anytime.
If you want to pass values in a request as parameters it has to be to your own (vf) page using param names you define, i.e. your own API.
I only just came across this post. You need to put the letters CF in front of the field id's.