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
Krishna Sahu 1Krishna Sahu 1 

How to restrict field to show other recordtypes record

I want to restrict a field to show only one recordtype record by trigger.
AnkaiahAnkaiah (Salesforce Developers) 
Hi Krishna,

You can assign that particular field to record type related pagelayout so that it wont visible to other recordtypes.

If this helps, Please mark it as best answer.

Thanks!!

 
Krishna Sahu 1Krishna Sahu 1
Hi Ankaish,
Suppose field  is A and that  A field is lookup to Account object.And on account object there are 6 record type.And i just want to show only one record type value on that field so how can i acheive this.
Thank You
Krishna Sahu
Geoffrey HillsGeoffrey Hills
I would like to restrict VISIBILITY (not just create and edit) to Opportunity Record Types, even for the Account Owner.  We would like our Regional Sales Executives (RSE) to not see certain Opportunity Record Types until they have been fully qualified by our Market Dev Reps (MDR).  Once the MDR has moved it to a certain stage, we want the RSE to see the Opportunities, so they can help close the deal.  We have a workflow rule/trigger/flow that will change the Record Type to a new Record Type once the Opportunity has reached that stage, so the RSE can see the Opp.  The MDR is in a role higher than the RSE so they can see the account and all of the associated opportunities (which is correct).  The OWD for Opportunities is "Private" so we're already at the most restrictive level possible.  If we could restrict visibility in the same way we restrict creation, that would be ideal.

https://www.aceflareaccount.net/
 
AnkaiahAnkaiah (Salesforce Developers) 
Hi Krishna,

You can create related lookup fiter on that look field A with recordtye fiter condition. you will see only that respective records in lookup search.

Refer the below help article.
https://help.salesforce.com/s/articleView?id=sf.fields_lookup_filters.htm&type=5

If this information helps, Please mark it as best answer.

Thanks!!
Krishna Sahu 1Krishna Sahu 1
Hi  Ankaiah,
This is the standard field i can't use look up filter on that.I need to write trigger.

Thank you
Krishna Sahu