TransWikia.com

how override New Button and Edit Button with LWC for one particular record type

Salesforce Asked by Manoj Patil on December 21, 2020

The requirement is to disable/enable some field based on value entered on other field while creating or editing a record, but this needs to happen for one record type. Currently, we have standard page layout in record detail lightening page.

is it possible to add logic to disable fields on record detail out of box component?

Another way that I am thinking of custom LWC to override the New button and Edit button, but can we do it for one particular record type?

Thanks.

2 Answers

If you are using a custom object, consider using Dynamic Forms which should allow you to provide much finer control on what the user can and cannot see based on visibility rules. It doesn't enable/disable, but rather hide/show, of course.

As to actions, consider using Dynamic Actions which again allow you to have finer control, including making actions available or not based on rules that use record details.

Answered by Phil W on December 21, 2020

In standard detail page, dynamically disable the fields can be done only on dependent picklsit, i.e showing different values for picklist in dependent based on master picklist.

Another thing that can restrict user from entering values to a field dynamically using validation rule or trigger.


If you are going for overriding the action, you can not do it based on record types. You need to handle the record types within your components directly.

Answered by sanket kumar on December 21, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP