Declare Trigger Questions : Part 1

1 . Your client wants to implement a use case so that whenever report instances get saved in production , you get notified . How will you do that? 

Ans : Will create a declare trigger

2. When declare trigger is used?

Ans: Create Declare Trigger rules to cause an activity to run when instances of a specific class are created, updated, or deleted in the database.

3. Is declare trigger, forward or backward chaining?

Ans:  This implements a form of forward chaining

4. What are the different types of event for which a declare trigger can be configured ?

Ans : Saved, Deleted, Saved and a property was modified, Committed save and Committed deleted.

5. You don’t want to engage your main thread to run trigger every time you perform a save. Is there any alternate to achieve it?

Ans :We will design the trigger with trigger in background option . It will ensure that the activity executes in a new requestor, outside of the context of forward chaining.

6. A developer complained that they have designed trigger with run in background option but still can’t get it worked correctly. The changes are not reflecting. What could be the reason?

Ans: If you chose run in background, The activity should include a Commit method

7. A developer is planning to use obj-save with write now with a trigger activity in background thread. Is it advisable or not?

Ans: No, this is not advisable. It is not supported.

8. What are the property types you can set a trigger ?

Ans : Single Value, Value List or Page List property

9. Your client has the following use case.

They want manager to update the CTC of every employee. They also want to store the old CTC separately. How will you do that ?

Ans: I will design a declare trigger to track change of the property and will set a property in the field copy value to” in order to capture the old data.

10. A developer designed its trigger activity in such a way so that it access some data from clipboard and process it . He also chose to run it in background. At runtime, it does not work . What could be the reason ?

Ans : The triggered activity cannot access clipboard pages other than the primary page. So if he tries to access any other page , then it will fail.


Suggest an Edit

Suggested Posts

Provide Delivery Details
* indicates required field