• Kadhar Basha J
  • NEWBIE
  • 0 Points
  • Member since 2019
  • Developer
  • MST

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi Team,

I have below requirement,

1) The Case can be created using email-to-case or manually.
2) There is a related object Resume.(It has ContactID field from Contact object using lookup relationship)
3) Both Case and Resume object has CaseStatus & Training fields. Also, Resume object has CasNumber field.
CaseNumber is a lookup field and CaseStatus is a derived field based on Case object CaseStatus.
4) Resume object has Trainingcourse field which mentions which course a Contact is assigned to. Each ContactID may have multiple entries in the resume object.
5) When a new Case is created and Training field is assigned to the Case, the combination of ContactId and Training should be checked if it exists in Resume object.
If combination exist and CaseNumber is present in Resume object, then Case should NOT be created. An error message should be thrown on the screen.
If combination exist and Casenumber is NOT present in Resume object, then Case should be created and CaseNumber should be entered in Resume object.

If the Combination of ContactId and Training does not exist in Resume table, Case should get created. ==> I know this doesn't make sense but thats requirement.
6) When an existing Case objects Training field is modified, the combination of ContactId and new Training should be checked if exists in Resume object.
If combination exist and CaseNumber is present in Resume object, then Case should NOT be created. An error message should be thrown on the screen.
If combination exist and Casenumber is NOT present in Resume object, then Case should be created and CaseNumber should be entered in Resume object.

If the Combination of ContactId and Training does not exist in Resume table, Case should get created. ==> I know this doesn't make sense but thats requirement.

I am planning to use Process Builder and Flow Builder Spring 19' combination  to check the condition, update the Case details in the Resume object.
I am not sure how can I prevent creation of Case if the combination of ContactId and Trainingcourse fields are already present in the Resume object?

Many Thanks in advance for all your help and support!
I want to create a custom send email button on cases which will have a default 'From' email address and a default template. Is there a code for this that has worked for others that i can simply switch out the template ID and 'from' address?