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
Bence GaalBence Gaal 

Hide fileds if no value

Hi All,

I m very new to salesforce and I m wondering if there is a way to hide custom fileds on custom Objects  if there is no value entered in them?

Thanks,
AnjaneyluAnjaneylu
Hi Gaal,
where do you want to hide the fields ?
like when you are entering the record details or after saving the record. ?

Regards
Anji
Bence GaalBence Gaal
Hi Anji,

After save. So I would like the field to behave like so: be visual on the Custom object display if there is value entered in the filed and not visual if there was no value entered into the field.

Thanks in advanced
Ray C. KaoRay C. Kao

You need to use 'Visualforce page' to achieve it in the Salesforce.
For example:
<apex:outputField rendered="{!IF(ISBLANK(Object__c.Field__c),false,true)}" value="{!Object__c.Field__c}"/>

Bence GaalBence Gaal
Thank you!