Since we can't update more than 10,000 records in trigger in real time I was thinking of automating the update of the remaining records through a batch called from a trigger.
So, Let's say for instance if we have 15,000 records and the number of records in trigger will exceed the governor limit 0f 10,000 when we try to do more than 10,000 dml in real time, so I want to run a batch from trigger itself when the number exceeds.Does it make sense?Is there a better way of doing it?
The problem I am facing is that we'll have to ensure that if there is no other instance of batch running before running it from trigger, but that batch is also being utilised for some other operation, so there is no way of identifying from AsyncApexJob object if the instance already exist for this particular operation.
Any help is appreciated! Thanks!