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
msc7808msc7808 

Validation

I have defined a Master Detail relationship on 1 table

 

Table A     (Master Table)

 

XYZ Hotel          123 Madison Avenue       New York        New York     10016

 

Table B     (Child Table)   Hotel Type

 

XYZ Hotel      SPA Hotel

XYZ Hotel      Boutique Hotel

ZYX Hotel      Golf Hotel

 

I would like to implement Validation rules whereby onSave of new record for Hotel Type, the rule will check if the Type is already defined for this hotel and therefore warn the user. ex. if a user was to create a new Hotel Type for XYZ Hotel and by mistake selects Golf hotel again, it will not accept that entry and show the message to the user.

 

Can this be done?


Thanks


MSC

cvjcvj
Yes, but you will need to write an Apex Trigger.