Activity Forums Salesforce® Discussions How to conditionally hide field in Salesforce?

  • How to conditionally hide field in Salesforce?

    Posted by Ravi on July 13, 2018 at 12:51 PM

    Hello all,

    Need help for below requirement.

    In Case object I have one custom field(Text) say Description and have another field say Private(Checkbox).

    When user create any case and mark Private as Checked (Checkbox) then Description field should be visible to only the Owner of the case (creator of  the cecord) and the users who are upward in the role hierarchy, and other users won't be able to see this field.

    How we can achieve this? any idea?

    PS: I have already checked using Record type and different page layout.

    Thanks in advance, every help is appreciated.

     

    Shuvam replied 2 years, 5 months ago 5 Members · 4 Replies
  • 4 Replies
  • shariq

    Member
    September 12, 2018 at 6:09 PM

    Hi Ravi,

    You need to overwrite the standard detail page with custom visualforce page, where you can show/hide the field on custom logic in script.

    Hope this helps.

  • Parul

    Member
    September 13, 2018 at 4:18 AM

    Hi

    I think you can't hide fields depending on values in other fields. Most user will set up a validation rule (VR) because Salesforce doesn't support this but if you to hide you can only do this by creating custom validation.

     

    Thanks

     

  • UTSAV GUPTA

    Member
    June 12, 2023 at 5:31 PM