Getting All Contract-Related Activities from a Minecraft Building Claim using mscrm.addons
One of the recurring challenges when working with Dataverse and Dynamics-style data models is connecting the dots between records that are related… but not always in obvious ways.
In our Minecraft Building Claim solution, contracts are at the center of everything:
- Design contracts
- Approval conversations
- Emails, notes, and follow-ups
All of these live as activities, and we needed a reliable way to fetch all contract-related activity data directly from a Building Claim.
This is where mscrm.addons quietly becomes your best friend.
The Problem
A Minecraft Building Claim:
- Is linked to a Contract
- The Contract owns multiple Activities
- Activities are polymorphic and stored across tables (email, task, note, etc.)
The challenge:
How do we retrieve every activity related to the contract — starting only from the building claim?
Direct relationships won’t get you all the way there.
The Data Model (Simplified)
Minecraft Building Claim
↓
Contract
↓
Activities
(email, task, note, etc.)
Activities are not directly related to the building claim — they’re related to the contract, and those relationships are handled through Dataverse activity pointers.
Why mscrm.addons?
mscrm.addons lets you:
- Extend FetchXML queries
- Traverse complex relationships
- Include activity-related data without manually querying every activity table
Instead of running:
- One query for emails
- One for tasks
- One for notes
- One for phone calls
You let Dataverse do the heavy lifting.
The Approach
Step 1: Start from the Building Claim
We begin with the Minecraft Building Claim record, which contains a lookup to the related contract.
Step 2: Traverse to the Contract
Using FetchXML, we link the building claim to the contract entity.
Step 3: Use mscrm.addons to Pull Activities
This is the key step.
With mscrm.addons, we can:
- Query all activity types at once
- Respect ownership and permissions
- Get a unified activity timeline
Example FetchXML (Conceptual)
<fetch>
<entity name="new_minecraftbuildingclaim">
<attribute name="new_name" />
<link-entity name="contract" from="contractid" to="new_contractid">
<attribute name="contractnumber" />
<link-entity name="activitypointer"
from="regardingobjectid"
to="contractid"
link-type="outer">
<attribute name="subject" />
<attribute name="activitytypecode" />
<attribute name="createdon" />
</link-entity>
</link-entity>
</entity>
</fetch>
Thanks to activitypointer, this single query gives you:
- Emails
- Tasks
- Appointments
- Notes
…all in one result set.
What mscrm.addons Adds
Without addons:
- You manually stitch data together
- Multiple API calls
- Complex Power Automate logic
With addons:
- One query
- Clean results
- Easy reuse in:
- Power Automate
- Plugins
- Custom APIs
- Power BI
Real-World Usage in the Minecraft Flow
We use this approach to:
- Display contract history on the building claim
- Validate approvals before construction starts
- Attach all communication to the claim timeline
- Feed Power BI reports showing claim-to-contract activity
All without duplicating data or building fragile flows.
Final Thoughts
If you’re working with:
- Contracts
- Claims
- Projects
- Or anything activity-heavy in Dataverse
…and you’re still querying activities table by table — stop.
mscrm.addons + activitypointer gives you:
- Cleaner architecture
- Fewer flows
- Happier future-you
And yes… it also makes Minecraft buildings feel enterprise-grade 🧱✨
Why This Works So Well
This approach gives us:
✅ Clear ownership of documents
✅ Zero manual handling
✅ Easy admin review
✅ Secure access control
✅ A scalable pattern for future documents
And most importantly:
Players can’t build until the paperwork is done.
Even in Minecraft, rules matter.
