• Bear Robins
  • NEWBIE
  • -1 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
We were looking to migrate to Files as a first step to prep for a Lightning migration and noticed a potential useful setting:

"Files uploaded to the Attachments related list on records are uploaded as Salesforce Files, not as attachments"

(Customize > Salesforce Files > Settings > General Settings)

I noticed that when when this setting is enabled it does not behave as expected. In fact it performs the opposite as it describes. It creates an Attachment when uploading a File as opposed to creating a File when uploading a legacy Attachment.

Is this the expected behavior? Why would I enable this setting in my org? Does anyone have a link I can read more about this?
My requirement is whenever the checkbox Did you confirm by DOB is true. The required field DOB will display and when the checkbox is false it will not.

Now the issue is when i am making the checkbox true field display but when i make it false it shows the following message and does not disappear from page

Please verify my code and tell me where is the problem. Also please verify that i am following the right way to make the field required. As i want this field only when the checkbox is true. This is the code
<apex:inputcheckbox value="{!chkBx2}" label="Did you confirm by DOB" > <apex:actionSupport event="onchange" rerender="thePanel" action="{!click2}"/> </apex:inputcheckbox> <apex:outputPanel id="thePanel" > <apex:pageBlockSectionItem rendered="{!displayInputputText}"> <apex:outputLabel escape="true" id="Component49" style="width:228px;" value="{!$ObjectType.BGC_Criminal_Search_Record__c.fields.DOB__c.label} "/> <apex:inputField id="Component43" value="{!record.DOB__c}" required="{!IF(chkBx2,true,false)}" /> </apex:pageBlockSectionItem> </apex:outputPanel>
 
public Boolean displayInputputText{get;set;}
  public Boolean chkBx2{get;set;}
      public PageReference click2(){    
    if(chkBx2){
      displayInputputText = true;
    }
    else{
      displayInputputText = false;
    }
    return null;
  }

User-added image