You need to sign in to do that
Don't have an account?
raj kiran
future call inside schedule batch apex
Hi All,
I am working on case where a scheduled batch calling a future method/class. As salesforce restricts the future call from batch , i am looking for any other alternative or workaround for this .
I need to use the future call in schedule batch because , the dml operation i do in future call is on configuration object, performing dml operation on configuration objects causes us Mixed DML exception . To over come this error we need to use the future call.
Any light on this is of great help.
I am working on case where a scheduled batch calling a future method/class. As salesforce restricts the future call from batch , i am looking for any other alternative or workaround for this .
I need to use the future call in schedule batch because , the dml operation i do in future call is on configuration object, performing dml operation on configuration objects causes us Mixed DML exception . To over come this error we need to use the future call.
Any light on this is of great help.
Create an object where you can seve detail which need to be updated in setup object
After that when oyu batch finish, in finish() method schedule a new class or fire another batch on that object which store setup object details in perform updates.
Thanks for the idea. will check out the approach.