+ Start a Discussion
Peter Reid 12Peter Reid 12 

Button: Create Case on Opportunity with prepopulated field values

Hi everyone, I found this online
&cas3_lkid={! NULLVALUE (Case.ContactId, Contact.Id )}
&cas3={! NULLVALUE (Case.Contact, Contact.Name )}
&cas11=AE - Web

This allows me to create a new button on Opportunity which in turn allows me to create a case on Opportunity, and relate it directly to that opportunity.  What I want to do here that I don't know is the following:

I have several fields on Opportunity object that, once I click my new button, I would like the value of those fields to be pre-populated on the new case.  This will not be a default value, this should pull the specifically selected field value.  I have identical fields on Case.  For example

Opportunity field: TEST FIELD:  1234
The value for my case field should be the same
Case field : TEST FIELD: 1234

The ultimate goal is my reps don't have to re- enter a bunch of fields that are already filled out.

Can this be done, and if so can someone give me an example of what I need to add to this button for this to work?   Thank you for any help
Peter Reid 12Peter Reid 12
Hi! Sorry I should have specified, a quick action won't work because I will have multi select picklists here, which can't be pre populated by the action
Alain CabonAlain Cabon
Ok, it is an exception indeed so you have to create a Visualforce page  called with a URL ( /apex/myNewVFP?param1=... )

Don't use the default new button but your own button New link button associated with a URL. 

Mark Hartnady 23Mark Hartnady 23
If you are using Lightning, then URL hacking will not work. Here are some alternative resources: