function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
textualtextual 

lightning form with picklist values based on recordtype

Hi, I'm trying to build out a process in lightning allowing a user to add tasks to a project but I want the list of available task types to vary based on the stage of the project. I was planning on using Task record types to control the list of task types and then have the form pull the task record type info as a picklist using a lightning form/component. However many issues arose while trying to do this. Here is my desired workflow:
  • from a project page, have a single button that launches a form (quick action to lightning component)
  • using a field from the project (status), show different tasks types available to chose from (task record type fields)
  • save task (forceData)
It seems as though apex cannot get the recordtype picklist values, so I was using the metadata api. And it seems controller apex launched from lightning requires a named credential and auth provider which I havent gotten to work. And the metadata api isnt able to pull from Task anayway. So I am at a loss on how to achieve the desired result.
Best Answer chosen by textual
sfdcMonkey.comsfdcMonkey.com
Hi textual, here is the sample post for how we can create custom record type selection with lightinng component
http://sfdcmonkey.com/2017/05/09/custom-record-type-selection-lightning-component/

Thanks, kindly let us know if it helps you

All Answers

sfdcMonkey.comsfdcMonkey.com
Hi textual, here is the sample post for how we can create custom record type selection with lightinng component
http://sfdcmonkey.com/2017/05/09/custom-record-type-selection-lightning-component/

Thanks, kindly let us know if it helps you
This was selected as the best answer
textualtextual
Perfect! Thanks for helping get this sorted. I was doing all kinds of weird things and this looks so much more straightforward, the salesforce way!