• rajend3
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hi,

 

I have an object with the following data {name, location, distance}.  I want to identify all the objects having the same name and location and delete all but the one with the shortest distance.  Would this be possible using SOQL?

 

If not would it be possible to write a trigger to avoid the creation of objects if they have the same name and location of an existing object?

 

Thanks

Hi,

 

I have an object with the following data {name, location, distance}.  I want to identify all the objects having the same name and location and delete all but the one with the shortest distance.  Would this be possible using SOQL?

 

If not would it be possible to write a trigger to avoid the creation of objects if they have the same name and location of an existing object?

 

Thanks