CRM 2013 customizer/developer here. I'm new to JavaScript and I need some help on the query I can use in an OnLoad event in CRM 2013.
On the 'Appointments' entity I need to set the value of a custom field (option set) based on entity type of it's related parent record (which is 'regardingobjectid').
Example;
-If 'regardingobjectid' Entity type = 'Account' then set value of "custom field" to "x",
-If 'regardingobjectid' Entity type = 'Contact' then set value of "custom field" to "y".
The custom field is an option set with 3 possible values (x,y,z) so if its possible to hide value "z" when 'regardingobjectid' Entity type = 'Contact' that would be awesome. Any help would be super appreciated.