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
Ekta Gupta 23Ekta Gupta 23 

I need to create a Lightning flow to change the record type

I need to create a custom button on Account  , when user clicks that button, it should kick a Lightning flow which then turns the record type for Account. Can somebody please point me to the solution as in how to build it.
Danish HodaDanish Hoda
Hi Ekta,
You can have below set of actions:
  • Create an AutoLaunched flow to have change the recordType of the account
  • Create a VF page with the controller class to invoke the above created flow
  • Create the button on Account to accomodate the VF page created above
SwethaSwetha (Salesforce Developers) 
HI Ekta,
You can create a button for the flow with ActionType as Flow 
Click Path:
Setup> Object Manager> Account> Buttons,Links,Action> New action> Choose ActionType=Flow from picklist and choose your flow

You need to customize the logic to Update record type using Flows based on steps in https://trailblazers.salesforce.com/answers?id=9063A000000lBKPQA2
https://trailblazers.salesforce.com/answers?id=9063A000000pfkpQAA

Related:
https://releasenotes.docs.salesforce.com/en-us/winter18/release-notes/rn_forcecom_flow_action.htm
 https://jenwlee.com/2020/02/07/run-flows-on-record-changes-before-save-updates/

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you