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
neeedhelpneeedhelp 

making fields required in Admin

Hello all,

 

   My requirement is Suppose there are 3 fields a,b,c in a object......When I enter value in field a,then b,c fields should be required....Can I do it....If yes how can I do it.....Help please

Best Answer chosen by Admin (Salesforce Developers) 
Laxman RaoLaxman Rao

+1 to Roy,

 

You can try this 

IF(Not(ISBLANK(Site)) && (ISBLANK(Description) || ISBLANK(Website)), true, false)

 

I have written this validation rule on account object.If Site is not blank then you should enter both Description and Website

 

Site is the field A

Description is the field B

Website is the field C

All Answers

RoyGiladRoyGilad

Hi,

If it is a picklist you can do a depended picklist.

 

If it is not you have basically two options:

1) Created a validation rule, when the user tries to save the record the validation will pop.

2) You could use JavaScript to validate the there are values in fields B \ C depends on the field A.

 

Option 1 is preferred since this is out-of-the-box option.

Option 2 requires more programming

 

I hope this helps,

Roy Gilad

 

 

Laxman RaoLaxman Rao

+1 to Roy,

 

You can try this 

IF(Not(ISBLANK(Site)) && (ISBLANK(Description) || ISBLANK(Website)), true, false)

 

I have written this validation rule on account object.If Site is not blank then you should enter both Description and Website

 

Site is the field A

Description is the field B

Website is the field C

This was selected as the best answer
nbknbk

You can acheive your requirement by using "Action Functions". Please go throug below link which explained to use Dynamic binding.

 

http://forceschool.blogspot.in/2011/06/dynamic-binding-use-action-functions-on.html

neeedhelpneeedhelp

Thanks Roy & Laxman......It works like a charm.......