1

I am trying to have an Opportunity Name defaulted on the initial Create screen from the parent Account. The use case is to have the Opp Name populated with something generic, and On Save, a workflow updates the name with a concatenation. But what I've read the only way to get a default text value on the "Create" screen is with a VF page, and then mapping the VF page to the "New Opportunity" button...the page looks perfect, but the Opp name is still blank, and I have a workflow that populates the Opp Name.

<apex:page standardController="Opportunity"
    action="{!URLFOR($Action.Opportunity.New, null, ['Opportunity.Name'='Test'], true)}" />
  • <apex:page standardController="Opportunity" action="{!URLFOR($Action.Opportunity.New, null, ['Opportunity.Name'='Derp'], true)}" /> – TNSalesforceGuru Jun 11 '15 at 17:15
2

Try :

you do not need Opportunity.name just Name should do the trick:

update : can you try opp3 = 'Test'

  <apex:page standardController="Opportunity"
        action="{!URLFOR($Action.Opportunity.New, null, [opp3 ='Test'], true)}" />

How do you identify the name of a field

For finding standard / custom field Id you can use the below method.

Step 1: Open chrome and click on new button on the opportunity.

Step 2: Right click on the opportunity name field and choose "Inspect Element"

The console will highlight the name and Id of the field.

enter image description here

  • Still blank unfortunately – TNSalesforceGuru Jun 11 '15 at 17:31
  • @TNSalesforceGuru do you have record types on oppty? – Rao Jun 11 '15 at 17:34
  • No it's a brand new blank dev org just spun up yesterday – TNSalesforceGuru Jun 11 '15 at 17:35
  • @TNSalesforceGuru look at the update – Rao Jun 11 '15 at 17:36
  • Wow. It's perfect. How did that fix it?? Thanks for your help Rao! I chose your answer as 'Correct' – TNSalesforceGuru Jun 11 '15 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.