+ Start a Discussion


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?



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