Question

In: Computer Science

A developer identifies the following triggers on the Expense_c object: DeleteExpense, applyDefaultstoex pense validateexpenseup date; The...

A developer identifies the following triggers on the Expense_c object:

DeleteExpense,

applyDefaultstoex

pense

validateexpenseup

date;

The triggers process before delete, before insert, and before update events respectively. Which two techniques should the developer implement to ensure trigger best practice are followed?

Solutions

Expert Solution

Q A developer identifies the following triggers on the Expense_c object:

DeleteExpense,

applyDefaultstoexpense

validateexpenseup

date;

The triggers process before delete, before insert, and before update events respectively. Which two techniques should the developer implement to ensure trigger best practice are followed?

Ans: Firstly let's take a little overview about the triggers. A triggers is basically a stored procedure , it is run when any specific actions occur within a database.Triggers help to ensure certain actions , example maintaining the audit file.

The two techniques that should the developer implement to ensure trigger best practice are :

1. Firstly it has to , Create helper classes to execute the appropriate logic when a record is saved.

2.And then after it has to Unify all three triggers in a single trigger on the Expense__c object that includes all events.

Triggers can be defined to run after or instead of the DML(Data Manipulation Language), the actions may be the UPDATE,INSERT,and DELETE.

In the simple word we can define the triggers as , it is a  specific table and one or more events.

THANKS, i think this will give you a better intuition about your questions. If you have any doubt feel free to ask in the comment section.


Related Solutions

Python: What are the defintions of the three method below for a class Date? class Date(object):...
Python: What are the defintions of the three method below for a class Date? class Date(object): "Represents a Calendar date"    def __init__(self, day=0, month=0, year=0): "Initialize" pass def __str__(self): "Return a printable string representing the date: m/d/y" pass    def before(self, other): "Is this date before that?"
JAVA - Write a program that creates an ArrayList and adds an Account object, a Date...
JAVA - Write a program that creates an ArrayList and adds an Account object, a Date object, a ClockWithAudio object, a BMI object, a Day object, and a FigurePane object. Then display all elements in the list. Assume that all classes (i.e. Date, Account, etc.) have their own no-argument constructor.
The assignment is to write a class called data. A Date object is intented to represent...
The assignment is to write a class called data. A Date object is intented to represent a particuar date's month, day and year. It should be represented as an int. -- write a method called earlier_date. The method should return True or False, depending on whether or not one date is earlier than another. Keep in mind that a method is called using the "dot" syntax. Therefore, assuming that d1 and d2 are Date objects, a valid method called to...
Which of the following is a condition that triggers the penalty for negligence or intentional disregard?
Which of the following is a condition that triggers the penalty for negligence or intentional disregard?
For the following hormones released from the hypothalamus, list the hormone it triggers from the anterior...
For the following hormones released from the hypothalamus, list the hormone it triggers from the anterior pituitary and that hormone’s action at its target cell. (1 pt) Prolactin releasing hormone Thyrotropin releasing hormone Corticotropic releasing hormone Gonadotropin releasing hormone
1. Following an infection (or injury) in some tissue, __1__ are released by cells, which triggers...
1. Following an infection (or injury) in some tissue, __1__ are released by cells, which triggers a(n) __2__. One result is the recruitment of __3__, which is part of __4__. These cells engulf the __5__ in a __6__. This structure then fuses with a __7__ forming a complex structure called a __8__. Inside, the pathogen is __9__ and the remnants are expulsed as __10__. Some of the cells performing this task are __11__, which hold on to some pathogen remnants...
Using Triggers (5 pts.) Execute the following SQL to create the customer_audit table in the premier...
Using Triggers (5 pts.) Execute the following SQL to create the customer_audit table in the premier schema. CREATE TABLE IF NOT EXISTS customer_audit ( customer_num CHAR(3) NOT NULL,   customer_name VARCHAR(35) NOT NULL, street VARCHAR(15), city VARCHAR(15), state CHAR(2), zip CHAR(5), credit_limit DECIMAL(8,2), date_changed DATETIME NOT NULL, changed_by VARCHAR(45) NOT NULL); Notice that the audit table does not have a primary key defined. Explain why this might be acceptable. Based on the current attributes in the customer_audit table, suggest a possible...
(Using Date Class) The following UML Class Diagram describes the java Date class: java.util.Date +Date() +Date(elapseTime:...
(Using Date Class) The following UML Class Diagram describes the java Date class: java.util.Date +Date() +Date(elapseTime: long) +toString(): String +getTime(): long +setTime(elapseTime: long): void Constructs a Date object for the current time. Constructs a Date object for a given time in milliseconds elapsed since January 1, 1970, GMT. Returns a string representing the date and time. Returns the number of milliseconds since January 1, 1970, GMT. Sets a new elapse time in the object. The + sign indicates public modifer...
The following table identifies a group of children by one of four hair colors, and by...
The following table identifies a group of children by one of four hair colors, and by type of hair. Hair Type Brown Blond Black Red Totals Wavy 19 13 5 42 Straight 78 14 14 Totals 19 211 Part (a) Complete the table. Hair Type Brown Blond Black Red Totals Wavy 19 13 5 42 Straight 78 14 14 Totals 19 211 Part (b) What is the probability that a randomly selected child will have wavy hair? (Enter your answer...
Which of these is not a type of transfer that triggers the generation skipping transfer tax
Which of these is not a type of transfer that triggers the generation skipping transfer tax
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT