Skip to content

[Bug] Cannot create N:N relations #365

@aabols

Description

@aabols

Describe the bug

For an N:N relationship, the CLI allows to add the intersect table as a source. The generated service includes the usual methods. Attempting to create a new relation using the create() method fails. Reading with getAll() works.

Code Apps documentation doesn't mention any limitations or recommendations around N:N relationships (that I could find).

Steps to Reproduce

  1. pac code add-data-source -a dataverse -t <intersect-table-logical-name>
  2. Try to create a record using the generated service
  3. See error

Expected behavior

New record created in intersect table.

Actual behavior

Request fails with error message.

Screenshots or Error Messages

{
    "code": "0x80040800",
    "message": "The 'Create' method does not support entities of type '<intersect-table-logical-name>'. MessageProcessorCache returned MessageProcessor.Empty. ",
    "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionSourceKey": "Api/PrePipeline",
    "@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepKey": "00000000-0000-0000-0000-000000000000",
    "@Microsoft.PowerApps.CDS.ErrorDetails.ApiDepthKey": "0",
    "@Microsoft.PowerApps.CDS.ErrorDetails.ApiActivityIdKey": "f6d0c6ea-45b8-4a23-b60b-4d21ad628ce6",
    "@Microsoft.PowerApps.CDS.ErrorDetails.ApiPluginSolutionNameKey": "System",
    "@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepSolutionNameKey": "System",
    "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionCategory": "ClientError",
    "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionMessageName": "SdkEntityDoesNotSupportMessage",
    "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionHttpStatusCode": "400",
    "@Microsoft.PowerApps.CDS.HelpLink": "http://go.microsoft.com/fwlink/?LinkID=398563&error=Microsoft.Crm.CrmException%3a80040800&client=platform",
    "@Microsoft.PowerApps.CDS.InnerError.Message": "The 'Create' method does not support entities of type '<intersect-table-logical-name>'. MessageProcessorCache returned MessageProcessor.Empty. "
}

Environment information

  • pac v2.7.4+g06bb2eb

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions