Skip to content

[Feature] handle entity collection bound action/function correctly#445

Merged
Power-Maverick merged 1 commit into
PowerPlatformToolBox:devfrom
drivardxrm:feat/execute-url-for-bound-entitycollection
Mar 9, 2026
Merged

[Feature] handle entity collection bound action/function correctly#445
Power-Maverick merged 1 commit into
PowerPlatformToolBox:devfrom
drivardxrm:feat/execute-url-for-bound-entitycollection

Conversation

@drivardxrm

Copy link
Copy Markdown
Contributor

If a CustomApi (action/function) is bound to an Entity Collection, the entityId field is not relevant (needed).

image

The URL of this type of api must include the Entyset name and
Ex. {entitysetname}/Microsoft.Dynamics.CRM.{customapi_iniquename}

This PR forms proper URL for these type of CustomAPI when an entityName is provided but no entityId

ref. https://learn.microsoft.com/en-us/power-apps/developer/data-platform/custom-api

image

Copilot AI review requested due to automatic review settings March 7, 2026 19:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Dataverse Web API execution URL construction to correctly support Custom APIs (actions/functions) bound to an entity collection, where entityId is not applicable. This aligns DataverseManager.execute() with Dataverse URL requirements for collection-bound operations.

Changes:

  • Adjust URL building to treat entityName + missing entityId as an entity-collection-bound operation ({entitySetName}/Microsoft.Dynamics.CRM.{operationName}).
  • Preserve existing behavior for record-bound operations ({entitySetName}({entityId})/...) and unbound operations.

Comment thread src/main/managers/dataverseManager.ts
Comment thread src/main/managers/dataverseManager.ts
@Power-Maverick

Copy link
Copy Markdown
Contributor

@drivardxrm thanks for fixing this issue. Can you please resolve the PR comments so we can get this merged into dev

@Power-Maverick Power-Maverick merged commit 9587368 into PowerPlatformToolBox:dev Mar 9, 2026
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.

3 participants