Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

How to validate the value is AOT object view or table?

(0) ShareShare
ReportReport
Posted on by 81

Hello,

I have a lookup form control which included tables and views.
I need to get the datasource and field from the properties of view field if the view was selected from the control.
I didn't found how to determine whether the value is a View or a table.


Any advice would be appreciated.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,979 Super User 2025 Season 1 on at
    RE: How to validate the value is AOT object view or table?

    Hi akshi,

    There is also a specific method on the DictTable class called isDataEntity(). Technically, a view is created for a data entity. That explains why the method isView() is returning True for data entities.

  • akshi Profile Picture
    akshi 81 on at
    RE: How to validate the value is AOT object view or table?

    Hi André Arnaud de Calavon,

    Thanks a lot for your help.

    I found that the method isView() of DictTable class.

    It worked fine for checking if it is a table or view.

    Please, note that this method also returns True for Data Entity.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,979 Super User 2025 Season 1 on at
    RE: How to validate the value is AOT object view or table?

    Hi Akshi,

    You can use the DictTable and SysDictTable classes where you can use e.g. the method is View() to find out if the datasource is a view.

  • Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: How to validate the value is AOT object view or table?

    Hi Akshi, I haven't tested it but since this article is looping menu items, you can probably leverage it to find if it's table or view.

    dynamicsnavax.blogspot.com/.../loop-through-aot-display-menu-items.html

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans