Skip to main content
I have an object called Application and a related one called Meeting.

 

An application will usually have up to 3 Meetings where the Type field = SOR.

 

What I need is a process to automatically indicate the first Meeting with the type of SOR in the series. (Maybe a formula checkbox or something similar)

 

Any ideas?
9 respuestas
  1. 27 ene 2017, 19:30
    OK then my assumption about the requirement was correct. Well you have two options here (from most preferable to least preferable):

     

    1. Install a third party app like Roll Up Helper or Declarative Lookup Rollup Summaries. Using these tools you can create a Roll Up that gives you the Minimum of the Date (or other date) from the Meeting object on the Application object (rollup criteria needs to include: Type = "SOR".

     

    So if Meeting 1 Date = 1/1/2016

     

    Meeting 2 Date = 2/1/2016

     

    Meeting 3 Date = 2/5/2016

     

    Roll Up on Application object would show (Rollup_Date__c) = 1/1/2016

     

    Remember that with the above tools, you will have to run a full calculation throughout the system to update existing records.

     

    Now create a formula field on the Meeting object like this:

    Date__c = Application.Rollup_Date__c

    This would check the box on the Meeting record showing it as the oldest record. 

     

    2. Apex trigger: I would prefer this over the first method if you have developer assistance. It would be a few lines of code and easily doable. I am always up for point and click solutions but this is one of those things that is easier to accomplish via Code.  For historical data, you would have to run a dummy update for all Meeting records (one time effort) and the Apex trigger will then work going forward.

     

    Both the above methods will be able to cover deletions. Choose the method that best suits your resources and requirements.
0/9000