How do I edit/remove fields from a tab on opportunity page layout? - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Louise BrysonLouise Bryson 

How do I edit/remove fields from a tab on opportunity page layout?

Hi,
In a sandbox I have added two new tabs to my opportunity page layout and named them.  I want to create a series of fields on those tabs that we can report on. I have added the component 'record detail' and it has added all of the same fields as the current opportunity detail and I can't seem to remove or edit them.How do I create a different set of fields on the new tab?

I have created a new page layout for each tab (not cloned) and fields which are currently mandatory are still displayed on the new tab.  Can I remove them from the new page layout or stop them from being visible, similar to when creating a new field you can choose which page layout it is uded on?
 
Best Answer chosen by Louise Bryson
Benjamin BratcherBenjamin Bratcher
Hi Louise,
Yes, my solution in the last screenshot will work in this scenario too. Just click on each of the tabs and drag the "Related Record" component onto the canvas. You will need two actions if you are wanting to have separate fields for both DMV and Integration. Just make sure to select the appropriate action in the properties pane for the Related Record component (the right sidebar where you can configure the component's settings).

If you have any further questions, I'm happy to help! Also, please select a best answer to this question to help other people in the community who might have the same question. Thanks!

All Answers

Benjamin BratcherBenjamin Bratcher
Hi Louise,

It sounds like you are wanting to split up the fields on the opportunity record detail in order to place certain fields in different sections on the Lightning Record Page. Page layouts are assigned for each record type and profile, so you cannot reference different page layouts on one Lightning Record Page. Currently, there are a few workarounds to make this work that I will address shortly. However, a new feature is currently available, unfortunately only for custom objects, that will allow you to do what you are asking for. It's called Dynamic Forms. In the Winter '21 release (https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_forcecom_lab_dynamic_forms_ga.htm" target="_blank), Dynamic Forms is GA for custom objects and desktop. I did a webinar (http://www2.internetcreations.com/Master-Builder-Lightning-App-Builder-On-Demand.html" target="_blank) and blog post (https://blog.internetcreations.com/2020/07/become-a-master-builder-with-lightning-app-builder/" target="_blank) recently about the Lightning App Builder and Dynamic Forms that might be worth checking out.

Dynamic Forms is unavailable for standard objects (i.e. Opportunities), so you will have to find a workaround. Note, Dynamic Forms is slated to be in beta for standard objects by Summer '21 release (safe-harbor) (https://trailblazers.salesforce.com/0693A000008d3B7" target="_blank). 

As a workaround, you can create a custom action (https://help.salesforce.com/articleView?id=creating_object_specific_actions.htm&type=5" target="_blank) and place that in a different area in your Lightning Record Page. First, go to Setup --> Object Manager --> Opportunities --> Buttons, Links, and Actions and create an action to Update a Record on Opportunities.

Opportunity Update Action

Then set the layout to include the fields you are wanting to display. You will have had to create the new fields previously.
Opportunity Update Action Layout

Finally, add a Related Record component to your Lightning Record Page and make sure the action is selected.
Opportunity Related Record Component for Update Action

This way you can have other fields in a different tab in your Lightning Record Page.

Another option is to use a paid app on the AppExchange called Lightning Field Sets (https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FYDVoUAP" target="_blank). I've used it before and it works brilliantly. You just have to create a field set with the fields you want to display and then reference that field set in the Lightning Component.

I hope this answered your questions! If you need more info, let me know!
 
Lokesh KumarLokesh Kumar
No, the fields which are set required/mandatory at the object level cannot be removed from the page-layout. 

Think... how can a record will be saved without providing the required field information. The other option would be using custom page record-view-from
Louise BrysonLouise Bryson
Hi Benjamin,

Thanks for your quick answer! I'll give that work around a go. I just want to check with you first because in your last pic you've added the related record to the right of the page, below is where I have created the new tabs (highlighted yellow), will this still work here do you think?

It's in those tabs I want to create new fields that relate only to the name of that tab and not the main opportunity detail.

Thanks again!

User-added image
Benjamin BratcherBenjamin Bratcher
Hi Louise,
Yes, my solution in the last screenshot will work in this scenario too. Just click on each of the tabs and drag the "Related Record" component onto the canvas. You will need two actions if you are wanting to have separate fields for both DMV and Integration. Just make sure to select the appropriate action in the properties pane for the Related Record component (the right sidebar where you can configure the component's settings).

If you have any further questions, I'm happy to help! Also, please select a best answer to this question to help other people in the community who might have the same question. Thanks!
This was selected as the best answer
Louise BrysonLouise Bryson
Thanks Benjamin, thats worked really well
Thanks for your help!