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
rajmrajm 

validating a student record

hi friends , im new to salesforce....here is one scenario.... i need to solve it ..i have to create a validation rule on student object.. validation rule should be like this..... can anyone help me....

 

A student details once entered in Engineering Stream; should not be allowed to be added in Medical/Architecture Stream ; 

 

Created a Custom Object with a name "Student” with these custom fields.

 

a. Student Name

b. Student Email Address

c. Student Roll Number (unique number allotted for each student)

d. Student Mailing Address

e. Aggregate Marks Obtained (Percentage field).

f. Rank Obtained.

g. Major (Dropdown with Engineering/Medical/Architecture Stream).

h. Exam Conducted on (Date).

 

:

 

Best Answer chosen by Admin (Salesforce Developers) 
skodisanaskodisana

Hi,

 

Create a two different record types on Student object called Engineering Stream and Medical/Architecture Stream.

Assign relevent picklist (Major) values for each record type and assign these two record types to profiles, So that when users are creating a new stdent record they will select Stream and proceed.

 

Thanks,

Srikanth.K

All Answers

Navatar_DbSupNavatar_DbSup

Hi,

 

Try the validation rule criteria:

 

IF ( ISCHANGED( Major__c ) && ISPICKVAL(PRIORVALUE(Major__c) , 'Engineering' ),true,false)

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

 

 

skodisanaskodisana

Hi,

 

Create a two different record types on Student object called Engineering Stream and Medical/Architecture Stream.

Assign relevent picklist (Major) values for each record type and assign these two record types to profiles, So that when users are creating a new stdent record they will select Stream and proceed.

 

Thanks,

Srikanth.K

This was selected as the best answer