function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rama_SFDCRama_SFDC 

How to bind field api name in result in LWC

Hi All ,
How to bind field api name in result , i'm passing field api and  thorugh the design property and passing record  to server side controller . when i hardcoded in js it is working fine 

@api fieldnames ; // desing property passing field api name 
@api fields ;
connectedCallback(){
getFields({recordid: this.recordId })
.then(result => {
this.fields = result.Name;
this.error = undefined ;
});
}

Below code not working when binding the design propert in the result 

connectedCallback(){
getFields({recordid: this.recordId })
.then(result => {
this.fields = result.fieldnames ;
this.error = undefined ;
});
}

Thanks in Advance