You need to sign in to do that
Don't have an account?

how do I split Apex into multiple transactions to avoid callout governor limits?
We have an external license key server that we use to fill in a license key field on Assets. The license key server is only able to return one license key at a time. The getLicenseKey function is called from a trigger and iterates through the Assets, returning a license key for each. However, if we run the trigger for anymore than 10 Assets we hit the 10 callouts governor limit.
Is there any way to avoid this governor limit by splitting the code into multiple Apex transactions somehow?
I guess you can try scheduled tasks
assign 10 licences for each run
This is what we ended up doing. We still sometimes hit the limits but it is infrequent enough that the customer is ok with re-running manually once in a while. I can't wait till scheduled apex comes out.