I've got this problem to solve.
I've an apex batch that updates some records all together when a condition is verified. This triggers a Process builder that calls an Apex Class or whatever it might help me to reach my goal.
I've multiple records in input and for each of them I need to do some stuff (queries, inserts, updates, etc..etc..) so let's say DML operation, which way can u suggest in order to process those records arrived in a List once a time?
AList is a list of 2 records, for each record I've to do stuff ( based on values of this records) but the two executions must be different one from the other in order to handle a rollback in case something goes wrong.
A detailed Example:
for each record in input I've to get ServiceContract and a Contract related to a value passed in input, after that I should check if an Account exists associated to the Contract, the type of the Account to check is based on values in the current processed record.
Thanks in advance.