Hello All,
I have created a custom control and apply that control to the new system opportunity view but what it noticed is OOB show chart is not working.

When I debug I found below error from developer tools.

I am fetching the link entity data (BPF Entity )from the custom control like below.
this.contextObj.utils
.getEntityMetadata(
this.contextObj.parameters.sampleDataSet.getTargetEntityType()
)
.then(r => {
this.contextObj.utils
.getEntityMetadata(this._dropdownvalue)
.then(b => {
this._bpfLinkingAttributeName = b.IsCustomEntity
? `bpf_${r.PrimaryIdAttribute}`
: r.PrimaryIdAttribute;
this.contextObj.parameters.sampleDataSet.linking.addLinkedEntity({
name: uniquename,
from: this._bpfLinkingAttributeName,
to: r.PrimaryIdAttribute,
linkType: "inner",
alias: "bpfentity"
});
if (this.contextObj.parameters.sampleDataSet.addColumn) {
this.contextObj.parameters.sampleDataSet.addColumn(
"activestageid",
"bpfentity"
);
this.contextObj.parameters.sampleDataSet.addColumn(
"processid",
"bpfentity"
);
this.contextObj.parameters.sampleDataSet.addColumn(
"createdby",
"bpfentity"
);
this.contextObj.parameters.sampleDataSet.addColumn(
"traversedpath",
"bpfentity"
);
this.contextObj.parameters.sampleDataSet.addColumn(
"businessprocessflowinstanceid",
"bpfentity"
);
this.contextObj.parameters.sampleDataSet.addColumn(
"statuscode",
"bpfentity"
);
}
})
.then(() => {
const conditionArray: any = [];
var condition = {
attributeName: "statuscode",
conditionOperator: 1, // NotEqual
value: 3,
entityAliasName: this._dropdownvalue,
};
conditionArray.push(condition);
this.contextObj.parameters.sampleDataSet.filtering.setFilter({
conditions: conditionArray,
filterOperator: 0, // And
});
this.contextObj.parameters.sampleDataSet.refresh();
});
});
Can anyone please let me know what I am doing wrong here ?