Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Relate Annotation with contract table

Posted on by Microsoft Employee

Hello everyone!

I was wondering how I can relate attachments in the table AnnotationBase with thier own contracts in teh accountcontractbase.

I mean, the relation does exist beacuse, in the CRM interface, if I open the "notes" part of a contract I can find the notes attached to it. So, someway there's a link between the entities, which I'm not able to figure out.

Could you help me? I don't know it other details are useful. however, I'm avaibile to give you further information if needed.

Thanks a lot,

L

*This post is locked for comments

  • Suggested answer
    Kumar Viju Profile Picture
    Kumar Viju 1,026 on at
    RE: Relate Annotation with contract table

    Hi,

    Assuming that you are writing SQL Query. You can try the following Join to retrieve notes for all the contracts. The Join is between AnnotationBase=> ObjectId and ContractBase =>ContractId

    SELECT        AnnotationBase.Subject, AnnotationBase.NoteText, ContractBase.ContractNumber

    FROM            AnnotationBase INNER JOIN

                            ContractBase ON AnnotationBase.ObjectId = ContractBase.ContractId

    Note: If you planning to use this query for SSRS reports , Consider using FiltereView instead of Base Table's

  • Tim Dutcher Profile Picture
    Tim Dutcher 2,100 on at
    RE: Relate Annotation with contract table

    I think you'll need to rephrase the question. You're seeing that there's a relationship between the annotation and contract entities, but it's not clear what you need to do with that information. Are you trying to write a query to get all notes for a contract?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Relate Annotation with contract table

    No one can help? :(

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans