Sage CRM integrated to Sage 300 ERP: Person Type "A/R Contact" fields- where are these held?

SUGGESTED

Looking for someone who knows their SQL tables here. 

What is the SQL table or view where I can query the Sage 300 ERP "Type" field as it relates to the CRM person record? Through the integration, the new fields "Sage 300 ERP A/R Contact" or "Sage 300 ERP A/P Contact" appear on the screen. Where are they in the database? Example is attached. 

Thanks for any help,

Arline

Parents
  • 0

    Thank you. That's definitely the table. Any idea what the proper linking is to join from the Person table? If I link on Pers_PersonId and Pers_companyId it seems like I've still got a join to do. Do you know where PeLi_PersonLinkId is meant to link? I see that it's the primary key so might just be auto-incrementing, but I'm getting some duplicates in a result set so I'm curious about the table structure. Thanks for the advice.

Reply
  • 0

    Thank you. That's definitely the table. Any idea what the proper linking is to join from the Person table? If I link on Pers_PersonId and Pers_companyId it seems like I've still got a join to do. Do you know where PeLi_PersonLinkId is meant to link? I see that it's the primary key so might just be auto-incrementing, but I'm getting some duplicates in a result set so I'm curious about the table structure. Thanks for the advice.

Children
  • 0 in reply to A-Welty
    SUGGESTED

    I believe it would be something like:

    SELECT Person_Link.PeLi_Type, Person.*
    FROM Person INNER JOIN
    Person_Link ON Person.Pers_PersonId = Person_Link.PeLi_PersonId

    Or, possibly, this... but the inclusion of CompanyID seems unnecessary:

    SELECT Person_Link.PeLi_Type, Person.*
    FROM Person INNER JOIN
    Person_Link ON Person.Pers_PersonId = Person_Link.PeLi_PersonId AND Person.Pers_CompanyId = Person_Link.PeLi_CompanyID