2 Replies Latest reply on Jan 12, 2018 4:59 PM by dmoler





      I need help finding an EventFrame. I was using the FindEventFrames function, but its performance is very bad (as described in this link: Aggregating Event Frame Data Part 2 of 9 - Let's Start at the End ), so I started using the FindObjectFields function. However it does not return the element bound to the EventFrame, it returns the element name, but I need the AFElement object, because I need several information that exists only in the element (do not exist in the event). Does anyone know how to get the AFElement object from the event element using this FindObjectFields function?

        • Re: FindObjectFields
          Dan Fishman

          It looks like you can't do it per the AF SDK documentation on the FindObjectFields.  Most of the fields returned are light weight and loading an element is a pretty large object!


          Also, the FindEventFrames functin is obsolete and you should get better performance out of the AFEventFrameSearch.  Loading the elements can be expensive.  Perhaps, you can change the template to store information from the element on the event frame. 


          I feel I constantly point this post out by Rick Davin  (it is that good!): Using the AFEventFrameSearch Class

          3 of 3 people found this helpful
          • Re: FindObjectFields

            FindObjectFields is intended to be fast and light-weight by avoiding the overhead of returning full AF Objects. However, for some use cases you will want the full objects. You can do this by calling FindEventFrames on the AFEventFrameSearch instance and getting the Element from the event frames or by using the FindObjectFields to bring back ElementID, then use the AFElement.FindElements call to load by batches of IDs. If you need to traverse several pages of data (the default page size is 1000 entries) then you should consider enable the cache by setting the CacheTimeout on the search.