+ Start a Discussion
RamyaKrishnaRamyaKrishna 

Custom Setting Validations on Dynamic VF page

Hi, Can u help me to solve this.

I have one custom object with fields (Name,Item__c(Picklist), Email__c, City__c)
This Item__c picklist field has some values like (9001,9002,9003,9004)
Now i have 2 custom settings namely CS1 & CS2. 
CS1:-
----
in this custom setting i added all the custom object fields and based on this custom setting i Constructed a Dynamic VF page.
CS2:-
----
This contains some fields like, 
Name, ItemName__c,Required__c.
In Second Custom setting i created some records like this,
Name : Field1
ItemName__c : 9001
Required__c   : true
Name : Field2
ItemName__c: 9002
Required__c : false
----etc.
In dynamic vf page initially i need to display all the fields from the custom settings.
1) when i choose 9001 value from the picklist i need to make some fields as mandatory and i need to display only those mandatory fields on Vf page dynamically (based on Required__c value from the custom setting).
2) when i choose 9001 value i need to make some fields as mandatory and i need to display some other fields. (if Required__c is false then all the fields(except Name) are not mandatory) and i can enter values to these fields.
This functionality is similar to record types in Salesforce.
Based on product value i need to enable or disable fields on Dynamic Visual force page. (but here we should consider the Required__c boolean value)
Please suggest me.
Thanks in Advance.

 

raseshtcsraseshtcs