Forum Discussion

BrandonH's avatar
BrandonH
Contributor
6 years ago

How to Get 'Advanced View' Object Fields?

I'm using the following to get the object fields for a mapped object:

 

aqObject.GetFields(Aliases.Obj, true)

 

I'm returned 0 fields found for an object that definitely has fields.  My only guess is that the GetFields method only returns the basic view fields (which the object does not have any) and does not return the advanced view fields.  Is there a way to return the object's advanced view fields?

5 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    There is a difference between "Fields" and "Properties".  Can you post a screenshot of the Object Spy of the object you're working with that is not returning fields?

    • BrandonH's avatar
      BrandonH
      Contributor

      Hi Robert,

       

          Unfortunately, I can't post a screenshot.  However, when looking at the Object Spy for this object, the Fields tab is present and populated with numerous Private and Protected Fields (in Advanced View).  When I select the "view basic members (Basic View)" link, the Fields tab disappears.  I'm speculating that this is why the GetFields method returns null.  Any thoughts? 

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        The other possibility could be a timing issue.  Without knowing your code, can't say for sure.  But the possibility could be that Aliases.Obj does not exist yet at the time you call "GetFields".  So it will return an empty iteration object.

        Double check your timing that, when you make that call, that you've waited for the page to load or the object to be instantiated or whatever.