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
RamyaKrishnaRamyaKrishna 

Reg: Required fields validations on Custom Setting

Hi,

I have a custom object with 3 fields. Later i will add these 3 fields into custom setting (Constructring Dynamic VF page).
slno (standard), itemname__c (custom text), Required__c (checkbox).
In this , If the Required__c value is 'true' then i need to make itemname__c as a required field.
suppose, If the Required__c value is 'false' then i need to make itemname__c as an ordinary field (not required).
Based on this scenario i need to perform the validations and add the records into Custom object. 

 

Can you suggest me.

Regards:

Ramya

Ankit AroraAnkit Arora

Get the boolean value of custom setting in controller of VF page and if its true and field value is null or blank then throw exception when save is called from controller.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page