Skip to content

Claude/analyze cab files 01 th36 nsc pu3upp dch66b r tq#51

Merged
BenSweaterVest merged 5 commits into
mainfrom
claude/analyze-cab-files-01Th36NscPU3uppDCH66bRTq
Nov 16, 2025
Merged

Claude/analyze cab files 01 th36 nsc pu3upp dch66b r tq#51
BenSweaterVest merged 5 commits into
mainfrom
claude/analyze-cab-files-01Th36NscPU3uppDCH66bRTq

Conversation

@BenSweaterVest
Copy link
Copy Markdown
Owner

No description provided.

The AsyncOperation relationship error was caused by incorrect system
relationship format. Our relationships didn't match Microsoft's official
format, causing GUID lookup failures during import.

CHANGES TO SYSTEM RELATIONSHIPS:
- Removed: IsCustomRelationship (not used by Microsoft)
- Changed: IntroducedVersion from "2.0.0.0" to "1.0" (Microsoft standard)
- Removed: SecurityTypes element (not in Microsoft format)
- Removed: IsValidForAdvancedFind (not in system relationships)
- Removed: SchemaName (not in Microsoft format)
- Fixed: Attribute names now use PascalCase (OwningBusinessUnit, CreatedBy, etc.)
- Added: Proper descriptions for each relationship type

BEFORE (incorrect):
- IsCustomRelationship: 0
- IntroducedVersion: 2.0.0.0
- ReferencingAttributeName: owningbusinessunit
- SecurityTypes: Append

AFTER (Microsoft format):
- IsCustomizable: 1
- IntroducedVersion: 1.0
- ReferencingAttributeName: OwningBusinessUnit

Updated add_system_relationships.py to generate correct format.
Regenerated all 54 system relationships.
Created new solution packages in releases/ folder.

SHA256: 851a9a1412fbca5d6de163db3b7d50e45ec400a13f18ea2252b91a8d3be40d25

This should resolve the entity creation error during import.
The AsyncOperation error was happening because we were including system
relationships in an UNMANAGED solution with NEW entities.

KEY INSIGHT:
Microsoft samples are MANAGED solutions (<Managed>1</Managed>) exported
from existing environments. They include system relationships because
those entities already exist.

Our solution is UNMANAGED (<Managed>0</Managed>) with NEW entities that
don't exist yet. Dataverse automatically creates system relationships
when new entities are registered. Including them manually causes GUID
lookup conflicts during the AsyncOperation relationship creation.

CHANGES:
- Removed ALL 54 system relationships from customizations.xml
- Kept only the 13 custom entity relationships
- Dataverse will auto-create: business_unit, lk_createdby, lk_modifiedby,
  owner, team, and user relationships when entities are imported

File size reduced: 9588 lines → 8503 lines (1085 lines removed)
Package size reduced: 35KB → 34KB

NEW PACKAGE:
- PerformanceManagement_v2.0.0.0_NO_SYSTEM_RELS.zip
- SHA256: 4bf9e8e03bcce22a286fa0f56251c82e587e579209e86e31aa4805295a5a31e1

This should resolve the "No rows could be found for Entity" error
during AsyncOperation relationship creation.
…error

The AsyncOperation relationship error was caused by MISSING entity metadata.
Our entities only had attributes but no entity-level metadata, while Microsoft
samples have extensive metadata between </attributes> and </entity>.

ROOT CAUSE:
Without proper entity metadata, Dataverse cannot correctly determine:
- Entity ownership model (UserOwned)
- Whether entity is an Activity (IsActivity=0)
- Whether to create AsyncOperation relationships
- Many other entity behaviors

This caused GUID lookup failures during automatic AsyncOperation relationship
creation because the entity type wasn't properly defined.

METADATA ADDED (61 lines per entity × 9 entities = 549 lines):
- EntitySetName: Plural name for OData endpoints
- OwnershipTypeMask: UserOwned (CRITICAL)
- IsActivity: 0 (prevents activity-specific relationships)
- IsActivityParty: 0
- IntroducedVersion: 1.0
- IsAuditEnabled: 0
- Mobile/offline settings
- Customizability flags
- And 50+ other required metadata fields

KEY FLAGS:
✅ <OwnershipTypeMask>UserOwned</OwnershipTypeMask>
✅ <IsActivity>0</IsActivity>
✅ <IsActivityParty>0</IsActivityParty>
✅ <IntroducedVersion>1.0</IntroducedVersion>

BEFORE:
  </attributes>
</entity>

AFTER:
  </attributes>
  <EntitySetName>pm_staffmembers</EntitySetName>
  <OwnershipTypeMask>UserOwned</OwnershipTypeMask>
  <IsActivity>0</IsActivity>
  ... (58 more metadata fields)
</entity>

File size: 8,503 lines → 9,053 lines (+550 lines)
Package size: 34KB → 42KB (+8KB metadata)

NEW PACKAGE:
- PerformanceManagement_v2.0.0.0_WITH_METADATA.zip
- SHA256: fb1b5b1165ffc7e5b7bb6e2c6a848b63ac1a4c14d1a23f1f299840caf54defe0

This should resolve the AsyncOperation GUID lookup error by properly
defining entity metadata according to Microsoft's official format.
The import was failing with OptionSet lookup error:
"No rows could be found for OptionSet with id e31907e5-e67d-4961-87fd-9ef4e296fbba"

This occurred at AddEntityIntoMobileOffliedEnabledList because we had:
<IsOfflineInMobileClient>1</IsOfflineInMobileClient>

ROOT CAUSE:
Setting IsOfflineInMobileClient=1 triggers Dataverse to add the entity to a
mobile offline enabled list, which requires looking up an OptionSet that
doesn't exist in Teams environments.

FIX:
Changed to match Microsoft's Teams sample format:
<IsOfflineInMobileClient>0</IsOfflineInMobileClient>

This prevents the mobile offline registration which was causing the OptionSet
lookup to fail.

BEFORE:
<IsOfflineInMobileClient>1</IsOfflineInMobileClient>

AFTER:
<IsOfflineInMobileClient>0</IsOfflineInMobileClient>

Applied to all 9 entities.

NEW PACKAGE:
- PerformanceManagement_v2.0.0.0_MOBILE_OFFLINE_FIXED.zip
- SHA256: ba9c12ea3dc860a582bec7fdb183f99b492d6bb546c3325463a2858dc63009d7

This should resolve the OptionSet lookup error during entity creation.
The import was failing with attribute validation error:
"The format DateOnly is not valid for the datetime type column pm_startdate"

ROOT CAUSE:
DateOnly is not a valid format for datetime fields in Dataverse for Teams.
This format is used for date-only fields without time component, but Teams
doesn't support this format.

FIELDS AFFECTED (9 total):
- pm_StaffMember.pm_startdate (Start Date)
- pm_WeeklyEvaluation.pm_evaluationdate (Evaluation Date)
- pm_SelfEvaluation.pm_evaluationdate (Evaluation Date)
- pm_IDPEntry.pm_targetdate (Target Date)
- pm_MeetingNote.pm_meetingdate (Meeting Date)
- pm_Goal.pm_targetdate (Target Date)
- pm_Goal.pm_completiondate (Completion Date)
- pm_Recognition.pm_recognitiondate (Recognition Date)
- pm_ActionItem.pm_duedate (Due Date)

FIX:
Changed all datetime fields from DateOnly to DateAndTime format:
<Format>DateOnly</Format> → <Format>DateAndTime</Format>

This is the valid format for datetime fields in Teams Dataverse and will
store both date and time components (time will default to 00:00 if not set).

NEW PACKAGE:
- PerformanceManagement_v2.0.0.0_DATETIME_FIXED.zip
- SHA256: 6665c81788373440fad5fded0e59d2201e563c260d3f49542256ddc135608199

This should resolve the attribute format validation error during entity creation.
@BenSweaterVest BenSweaterVest merged commit 822b640 into main Nov 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants