Can we call trigger from batch apex? If yes where should we call and if not then why?
There is no specific place from where you call a trigger. Trigger code automatically executes when certain events such as insert, update, delete etc occur. The source for such events could be anything. For eg -
- Button click on visualforce page or on detail page of a record causing an insert/update/delete
- An apex code with DML statements(this could be a regular Apex class, batch class, or even some other trigger)
- Workflow field updates...
From the Trigger Docs:
A trigger is Apex code that executes before or after the following types of operations: insert update delete merge upsert undelete