I am working on a sample PCF dataset control where I need to retrieve data from related entities. To achieve this, I have used the PCF linked entities method, and it is working as expected.
However, I observed that when using the PCF control linked entities method—PCF automatically attaches the linked entity filters in the filters as shown in below image
Because of this, when I open the entity’s view and try to apply new filters from there (e.g., "Budget amount Equals 68000"), no records are returned or displayed.
When I downloaded the FetchXML from the view, I noticed that an extra condition is being added. Due to this condition, the records are not returned or displayed, as shown in the image
Below is the code I am using to add the linked entity and its columns
private async addLinkedEntity() {
try {
this.context.parameters.opportunityDataset.linking.addLinkedEntity({
name: "account",
from: "accountid",
to: "customerid",
linkType: "outer",
alias: "accountdetails"
});
} catch (error: any) {
console.error("Error managing linked entities:", error);
}
}
private addLinkedEntityColumns(): void {
let linkedEntityColumns = ["name", "primarycontactid"];
try {
if (this.context.parameters.opportunityDataset.addColumn) {
let columnsAdded = false;
linkedEntityColumns.forEach((column) => {
let matchedIndex = this.context.parameters.opportunityDataset.columns.findIndex(
(item: any) => item.name === `accountdetails.${column}`
);
if (matchedIndex === -1) {
if (this.context.parameters.opportunityDataset.addColumn) {
this.context.parameters.opportunityDataset.addColumn(column, "accountdetails");
columnsAdded = true;
}
}
});
if (columnsAdded) {
this.context.parameters.opportunityDataset.refresh();
}
}
} catch (error: any) {
console.error("Error adding linked entity columns:", error);
}
}
Has anyone else encountered this issue? How did you handle it? Any help is much appreciated!
Thanks!

Report
All responses (
Answers (