• Allan Lorentzen
  • NEWBIE
  • 15 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
I have two custom objects [access.log & trans.log] who receive daily updates [New Records] from an external system. After 31 days we don't need them anymore and we would like to delete them. Both objects have a date field on the record 'Log_date__c'.

I know that you can make a job that deletes these records on a daily basis.

My question;

- How do I write a code that deletes the right records? (Log_date__c older than 31 days)
- How/where do I put in SFDC? (Apex Class or Trigger! - Both!)

Are there any who can help me progress. In which case it will be my first code in SFDC.
I have two custom objects [access.log & trans.log] who receive daily updates [New Records] from an external system. After 31 days we don't need them anymore and we would like to delete them. Both objects have a date field on the record 'Log_date__c'.

I know that you can make a job that deletes these records on a daily basis.

My question;

- How do I write a code that deletes the right records? (Log_date__c older than 31 days)
- How/where do I put in SFDC? (Apex Class or Trigger! - Both!)

Are there any who can help me progress. In which case it will be my first code in SFDC.
I have two custom objects [access.log & trans.log] who receive daily updates [New Records] from an external system. After 31 days we don't need them anymore and we would like to delete them. Both objects have a date field on the record 'Log_date__c'.

I know that you can make a job that deletes these records on a daily basis.

My question;

- How do I write a code that deletes the right records? (Log_date__c older than 31 days)
- How/where do I put in SFDC? (Apex Class or Trigger! - Both!)

Are there any who can help me progress. In which case it will be my first code in SFDC.