web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Is there any way to use (find All References) option via x++ code

(0) ShareShare
ReportReport
Posted on by 184

HI All,

I have a requirement where I need to know how many objects in AOT uses my class or form dynamically.

I know there is an option of Find All references via which it is possible. But I want to do the same via code.

Can it be done? 

Please suggest me if at all there is any possibility.

Thanks in advance!!

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    You can use code (SQL, LINQ...) to query tables in DynamicsXRefDB.

    Note that this database is used for development. It's not available in non-development environments.

  • D365_Wibes Profile Picture
    184 on at

    Hi Martin,

    Thanks for the response.

    Can you please give me some sample code?

    And via that I can achieve all reference right?

    For Ex:

    If I have created classA

    Then I ll get al the objects whichever is using (classA) .  Correct?

    Please suggest me some sample code .

    Thanks

  • D365_Wibes Profile Picture
    184 on at

    Sorry I mean via the code will i get all the list of forms whichever is using my selected tables?

    Please suggest some sample code please

  • Suggested answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Try something like this (T-SQL):

    select RefNames.Path from [References]
    join Names as RefNames on RefNames.Id = [References].SourceId
    join Names as FindNames on FindNames.Id = [References].TargetId
    where FindNames.Path = '/Tables/CustGroup'
    and RefNames.Path like '/Forms/%'

  • D365_Wibes Profile Picture
    184 on at

    Thanks again Martin,

    Let me try this and tell you...

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 266 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 213 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 140 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans