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
Arunkumar KathirArunkumar Kathir 

To make a DATE field editable(or visible) when we click on checkbox

Hi,

 

I have a requirement like I want to enter some date value to a date field only when the check box is selected.

 

That date field should be non-editable or invisible if the check box is not selected. 

 

I know this will be done through VF pages. But I need to be done this scenario without using VF pages and apex classes. 

 

Can anyone please help on this?

 

 

Thanks,

Arunkumar

RakeshistomRakeshistom
Not Possible, you can use VF Pages for that
@taani.ax1426@taani.ax1426

hi,

 

You can create new recordtype with new pagelayout. At first make Date field as read only, when user check "Checkbox" update record type which using other page layout with date field editable.

 

regards,

Taani

RakeshistomRakeshistom

Is there any other way to do this ?

mast0rmast0r

I would try to use a validation rule for that with Error Condition Formula: CheckBoxField__c != true

So if your checkbox is not checked the user will see an error message and can not save the record.

@taani.ax1426@taani.ax1426

Hi,

Try this:

 

IF(checkbox__c ==true, ISNULL( date__c ) , False)

 

regards,

Taani