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

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Tables relationships

(0) ShareShare
ReportReport
Posted on by

Hi

Is there a way to get the relationships between tables of a module in GP?

What if this module is installed from external resource?

Thx

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at
    RE: Tables relationships

    what do you mean by External Resource?

    Inside GP SDK you can find table relationship detail per module.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Tables relationships

    Hi

    Good Day !!

    Try this query ..

    select t.name as TableWithForeignKey, fk.constraint_column_id as FK_PartNo , c.name as ForeignKeyColumn

    from sys.foreign_key_columns as fk

    inner join sys.tables as t on fk.parent_object_id = t.object_id

    inner join sys.columns as c on fk.parent_object_id = c.object_id and fk.parent_column_id = c.column_id

    --where fk.referenced_object_id = (select object_id from sys.tables where name = 'SY10600')

    order by TableWithForeignKey, FK_PartNo

    Regards,

    Rinson KE

    DBA

  • Verified answer
    L Vail Profile Picture
    65,271 on at
    RE: Tables relationships

    Hi,

    The only problem with this is that GP only has a couple of tables that have established foreign keys. The table relationships are handled by the dexterity programmer. There are several tools to aid you in your search, but there is not a data dictionary available that will tell you how everything is related. The SDK contains a model that will show you which tables are related, but it does not identify which column.

    Kind regards,

    Leslie

  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,069 Most Valuable Professional on at
    RE: Tables relationships

    Hi Hasan

    Have you looked at the ER (Entity Relationship) diagrams provided in the SDK (Software Developer Kit)?

    The SDK can be installed from the Tools folder of the DVD image.

    David

  • Verified answer
    Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Tables relationships

    That has been one of the most controversial topics that our colleagues and I have discussed thoroughly. The debate was raised due to a simple questions, Is Dynamics GP database relational or not ? Some people claimed that simply it is not since the theory of a relational database is not applied in Dynamics GP on the SQL server level, and therefore, tables are not linked through a primary-foreign key relationship, no database diagram can be printed illustrating the relations among tables. On the other hand, others have argues that the logic is there, and the relations are enforced by the application layers as it is stored within Dexterity.

    Therefore, if you are looking for the ultimate value of how tables are linked, get the SDK as mentioned above, and check the rules and validations which are enforced by the application on the database tables.

    Meanwhile, let us know if you have any further concerns,

    Your feedback is highly appreciated,

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans