Skip to content

Commit 997239e

Browse files
committed
add example error message
1 parent b7e0f91 commit 997239e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

powerapps-docs/developer/common-data-service/custom-api.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,19 @@ It is not possible to create the Custom API, Custom API Request Parameter, and C
437437

438438
If you define your Custom API as a function by setting the **Is Function** property to true, you cannot bind the function to an entity or entity collection. You also cannot use any **Entity** or **EntityCollection** request parameters.
439439

440+
If you attempt this you with a function bound to the account entity, you can expect a `400 Bad Request` error like this:
441+
442+
`GET [Organization URL]/api/data/v9.1/accounts/Microsoft.Dynamics.CRM.new_CollectionBoundFunction()`
443+
444+
```json
445+
{
446+
"error": {
447+
"code": "0x8006088a",
448+
"message": "The request URI is not valid. Since the segment 'accounts' refers to a collection, this must be the last segment in the request URI or it must be followed by an function or action that can be bound to it otherwise all intermediate segments must refer to a single resource."
449+
}
450+
}
451+
```
452+
440453
### Private messages cannot be used in plug-ins
441454

442455
If you define your custom API to be private, you cannot use that message in a plug-in. More information: [Private Messages](org-service/use-messages.md#private-messages)

0 commit comments

Comments
 (0)