You need to sign in to do that
Don't have an account?
sfdcraj
clear old data from analytic snapshot after it runs and loads custom object with new data
Hi,
I have created an analytic snapshot which has source report (opportunity data) and loads it into custom object. I scheduled it to run daily. Now, when it runs it just inserts data into my custom object. It is not clearing the old data existing in the custom object.
Is there any way I can clear out the old data, so that I have only the fresh copy of data every time ???
Regards,
raj.
I have created an analytic snapshot which has source report (opportunity data) and loads it into custom object. I scheduled it to run daily. Now, when it runs it just inserts data into my custom object. It is not clearing the old data existing in the custom object.
Is there any way I can clear out the old data, so that I have only the fresh copy of data every time ???
Regards,
raj.
This functionality is not available out of the box, but you can achieve it with a trigger.
The trigger would activate after insert and would delete any records in the object that were not created on that day. Here is some code that might help. Keep in mind that this will only work if you are running the snapshot daily.
Hope this helps!