1) I am getting undefined or null value for companyname field on lead entity when selecting from property-set.
2) But if I add companyname field on OOB grid columns and then select that same field form property-set then I am able to get correct value for the field.
3)There a strange scenario in which it sort of works, if I open the lead record from my pcf control whose navigation is set to new window after that if I navigate to lead home grid then I am able to view companyname for that particular field which I had opened previously for rest of the records it will still be undefined or null.
4) We tried to add companyname column programmatically using context.parameters.sampledataset.addColumn().
5) It's not working for companyname, but for createdon we are able to get createdon value using addColumn
2) I have investigated, the root cause is the lead's OOB view, like 'My Open Leads', its view's layoutXml does have 'companyname', but fetchXml does not. In some sense, these views are special and impact the things.
So, the scope of the issues are limited to these special Lead Views only.
I have internally created a bug to track this. @HemantG will triage these