• Joseph Hurless 4
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies

Hey, admin here trying to learn more apex. Could anyone help me with some of these. I have 1 all set just working on code for number 2 currently.

1. Add a multi-select field to Contact that lists each species of animal (Cat, Dog or Bird) the Contact can own.
2. Using Apex, update the Contact record to automatically show all the species of pets a Contact owns when a Pet record is added or changed.
3. Using Visualforce, create a page that lists all Veterinarians entered on Pet records.
4. On that same Visualforce page, show all Pet records associated with a Veterinarian when one of the Veterinarians in the list above is selected.
Show all the fields for each pet, and allow the Vaccination Date field to be updated for each pet, and saved for all shown pets at once.
 

Hi, I am having trouble with tasks 2 through 4. Can someoone please help?

1. Add fields to the Custom Object to capture the following information on the page layout for each pet. :
Cat, Dog or Bird
Breed
Color
Coat Length
Age
Sex
Veterinarian
Vaccination Date (Make this field read-only to all Profiles except for Veterinarian)
Personality Description
2. Add a field to the “Pet” Object called Pet Owner that relates the records to the Contact object.
3. Add a field to Contact that automatically presents the total number of pets the Contact owns.
4. Add three fields to Contact that automatically presents the total number of Cats, Dogs and Birds respectively.