0

Is there a way to add a button to allow a user to modify the recordType of many items in a list view in Lightning.

2

Salesforce doesn't make it easy to do this out of the box, declaratively. This is probably because changing the record type of a record can involve several follow-up steps:

  • Picklist field options can vary by record type, so the values that are currently in those fields may no longer be valid once you change the record type

  • Different record types often have different page layouts associated with them, and the the page layouts in turn can have different fields specified as required. If an end user changes the record type without revisiting the detail page for the individual record being updated, field requirements that apply at the layout level will not be enforced.

You can bulk-update record types using Workbench and Data Loader -- in which case the above considerations will be ignored (for better or worse).

You can also develop a custom Visualforce page or Lightning Component that changes the record type for a set of selected records. Before doing this, it's important to get a complete understanding of the aforementioned considerations so that you are handling the updates appropriately. It's also important to note that admin changes to record types or page layouts in Setup have the potential to undermine your code. So proceed with caution!

  • Totally makes sense. I hadn't considered the ramifications of the rT change. Thank you. – SeanGorman Mar 6 at 14:12

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.