Reputation: 111
I'm working on a project to manage the human resources, well my question is: how can I control a picklist to create a new record?
Example: I go to Application tab, which contains a picklist, among values I choose 'Time Off'. I want it to redirect me to create a Time Off form (Start date, End date ... etc.) on a object Time off that I've already created.
Thank you
Upvotes: 0
Views: 170
Reputation: 414
Here's a link to one solution showing a button where the record type is being set instead of being allowed to default:
https://developer.salesforce.com/forums?id=906F00000008kdbIAA
The key is that parameter "p3" is the record type. You'll need to replace the code segment
"p3" = "012500000009Wjw"
with something like
"p3" = IF ( ISPICKVAL(TypeToCreate, "Time Off"), "<record type id of TimeOff>", "<default record type (or nest more IFs>"
You could also use Visualforce and Apex for this.
Upvotes: 0