UI API Limitations

UI API with Lightning Knowledge has these limitations.

RecordTypeId of Linked Record Shows as Null When It Shouldn’t

To retrieve the recordTypeId of a LinkedArticle.LinkedEntity record using the Get a Record UI API, replace Id with RecordTypeId. This limitation applies to API version 57.0 and later.

1// This code doesn't retrieve the correct recordTypeId.
2GET /services/data/v57.0/ui-api/records/{LinkedArticleId}?fields=LinkedArticle.LinkedEntity.Id
3// This code retrieves the correct recordTypeId.
4GET /services/data/v57.0/ui-api/records/{LinkedArticleId}?fields=LinkedArticle.LinkedEntity.RecordTypeId
The response shows the record type ID in two places.
  • LinkedEntity | value | fields | RecordTypeId | value—Shows the correct record type ID.
  • LinkedEntity | value | recordTypeId—Shows null even if there’s an associated record type.
1{
2    "apiName": "LinkedArticle",
3    "childRelationships": {},
4    "eTag": "0a4b81f3e165e7feefcc2f0e0f30e6da",
5    "fields": {
6        "LinkedEntity": {
7            "displayValue": "00000001",
8            "value": {
9                "apiName": "Name",
10                "childRelationships": {},
11                "eTag": "0917224c30df4322d4e5abbda36a9c25",
12                "fields": {
13                    "Id": {
14                        "displayValue": null,
15                        "value": "0WORM0000006nan4AA"
16                    },
17                    "RecordTypeId": {
18                        "displayValue": null,
19                        "value": "012RM0000005Yl2YAE"
20                    }
21                },
22                "id": "0WORM0000006nan4AA",
23                "lastModifiedById": null,
24                "lastModifiedDate": null,
25                "recordTypeId": null,
26                "recordTypeInfo": null,
27                "systemModstamp": null,
28                "weakEtag": 0
29            }
30        },
31        "LinkedEntityId": {
32            "displayValue": null,
33            "value": "0WORM0000006nan4AA"
34        }
35    },
36    "id": "1WKRM0000004MKA4A2",
37    "lastModifiedById": "005RM000002Z4dkYAC",
38    "lastModifiedDate": "2022-09-28T18:12:10.000Z",
39    "recordTypeId": "012000000000000AAA",
40    "recordTypeInfo": null,
41    "systemModstamp": "2022-09-28T18:12:10.000Z",
42    "weakEtag": 1664388730000
43}

object-info UI API Returns an Error

Changing the Object Name of the Knowledge object in Object Manager results in an error when you run the Get Object Metadata UI API for LinkedArticle or CaseArticle. Don’t change the Knowledge object name. This limitation applies to API version 57.0 and later.

Object Manager Details tab that shows Knowledge object name that must not change.

For example, you change the Knowledge object name and run these UI APIs.

1GET /services/data/v57.0/ui-api/object-info/LinkedArticle
2GET /services/data/v57.0/ui-api/object-info/CaseArticle

You get an INSUFFICIENT_ACCESS error.

1{
2    "errorCode":"INSUFFICIENT_ACCESS",
3    "message":"You don't have access to this record. Ask your administrator for help or to request access."
4}

Retrieving KnowledgeArticleVersion.RecordTypeId Fails

To retrieve the KnowledgeArticleVersion.RecordTypeId of LinkedArticle or CaseArticle records using the Get a Record UI API, use the optionaFields not fields request parameter. This limitation applies to API version 57.0 and later.

1GET /services/data/v57.0/ui-api/records/{LinkedArticleId}?optionalFields=LinkedArticle.KnowledgeArticleVersion.RecordTypeId
2GET /services/data/v57.0/ui-api/records/{CaseArticleId}?optionalFields=CaseArticle.KnowledgeArticleVersion.RecordTypeId

Here’s the error that you get when you try to retrieve this RecordTypeId using the fields request parameter.

1{
2    "errorCode": "INVALID_FIELD",
3    "message": "INVALID_FIELD: \nSELECT LastModifiedDate, KnowledgeArticleVersion.RecordTypeId\n                         ^\nERROR at Row:1:Column:26\nNo such column 'RecordTypeId' on entity 'KnowledgeArticleVersion'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names."
4}

Record Data and Metadata of Related Lists Don’t Show Up

If the related object isn’t added to the page layout of the parent record, UI API doesn’t return the record data or metadata of related lists. This limitation applies to API version 57.0 and later.

If the related object is missing from the page layout, you encounter one of these problems.
  • NVALID_TYPE error code
  • UNKNOWN_EXCEPTION error code
  • UI API returns the wrong record, for example, the LinkedArticle record instead of Article

To retrieve the correct record data or metadata with the related list UI API endpoints, add the related object to the parent object’s page layout.

1/ui-api/related-list-records/{parentRecordId}/{relatedListId}
2/ui-api/related-list-info/{parentObjectApiName}/{relatedListId}

To add a related list object, go to Object Manager | {PARENT_OBJECT} | Page Layouts | Related Lists.

Page Layouts tab in the Object Manager where you configure the related lists

For example, to retrieve the Articles related list with these UI API calls, add the Articles related list to the WorkOrder, WorkOrderLineItem, and Case page layouts. Apply this solution to other parent object types that Articles relate to.

1GET /services/data/v57.0/ui-api/related-list-records/{WorkOrderId}/LinkedArticles
2GET /services/data/v57.0/ui-api/related-list-records/{WorkOrderLineItemId}/LinkedArticles
3
4GET /services/data/v57.0/ui-api/related-list-info/{WorkOrderId}/LinkedArticles
5GET /services/data/v57.0/ui-api/related-list-info/{WorkOrderLineItemId}/LinkedArticles
6GET /services/data/v57.0/ui-api/related-list-info/{CaseId}/CaseArticles

To retrieve related list records related to Knowledge articles with these UI API calls, add the WorkOrder, WorkOrderLineItem, and SocialPosts related objects to the Knowledge page layout.

1GET /services/data/v57.0/ui-api/related-list-records/{KnowledgeArticleVersionId}/LinkedWorkOrders
2GET /services/data/v57.0/ui-api/related-list-records/{KnowledgeArticleVersionId}/LinkedWorkOrderLineItems
3GET /services/data/v57.0/ui-api/related-list-records/{KnowledgeArticleVersionId}/LinkedSocialPosts
4
5GET /services/data/v57.0/ui-api/related-list-info/{KnowledgeArticleVersionId}/LinkedWorkOrders
6GET /services/data/v57.0/ui-api/related-list-info/{KnowledgeArticleVersionId}/LinkedWorkOrderLineItems
7GET /services/data/v57.0/ui-api/related-list-info/{KnowledgeArticleVersionId}/LinkedSocialPosts

To retrieve record data or metadata of cases related to Knowledge articles, add the Cases related list to the Knowledge page layout.

1GET /services/data/v57.0/ui-api/related-list-info/{Knowledge__kavId}/CaseArticles