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
SFDC_2706SFDC_2706 

Lead conversion record type validations

Hi Experts
I have a following requirement and looking for best easy solution for it:
- There are 4 record types on Accounts (A, B, C, D)
- There are 6 record types on Opportunities (O, P, Q, R, S, T)

Now, when i am trying to convert a lead from the standard page in lightning then i want to see a validation error on that screen for following reasons:

- When account record type A is selected, then page should automatically create an opp of record type P and if any other record type is selected manually on opp then i should see an error on the lead conversion page.

- When account record type B is selected, then page should automatically create an opp to record type Q and if any other record type is selected manually on opp then i should see an error on the lead conversion page.

- When account record type C is selected, then user can only choose from O, R, S opp record type and if any other record type is selected manually on opp then i should see an error on the lead conversion page.

Error Message : Please correct the Account and Opp Record Types.

Let me know experts how this can be done and looking forward to your response soon. Thanks in advance..!!