https://na34.salesforce.com/setup/ui/recordtypeselect.jsp?ent=Case&retURL=%2F500%2Fo&save_new_url=%2F500%2Fe%3FretURL%3D%252F500%252Fo
However, even though I'm creating the Case from the Opportunity, the Opportunity name doesn't get populated into the Lookup Field.
Any pointers on how to auto-populate this?
Thanks!
5 answers
Hi Julia,
For starters you will have to hardcode the recordtypeId in your url. If you want that user should have the liberty to select the record type and then get the fields pre-populated then that is not possible.
After hardcoding the recordtypeid in url, your url will look something like this:
500/e?retURL=%2F500%2Fo&RecordType=0127F000000WT2q&ent=Case
Now in this url you have to assign the Opportunity ID to the custom field
500/e?retURL=%2F500%2Fo&RecordType=0127F000000WT2q&ent=Case&00N7F00000PNxxU={!Opportunity.Id}
In this url,
00N7F00000PNxxU is the custom field ID
Refer this link to know how to find the custom field ID : http://writeforce.blogspot.com/2013/01/prepopulating-fields-using-url-hacking.html
Now when you will click the button you will get the field populated with the Opportunity ID
Let me know if you need any further assistance