You need to sign in to do that
Don't have an account?
Lauren B
Show multiple records with same SSN in lightning record edit form in lwc.
Hi,
I have a requirement to show few fields from multiple records who has same SSN in ligtning record edit form. Currently I'm able to show to only one record. eg: There is four records of John Smith with the same SSN but Plan Type( Custom Field) is different in all the records. So I've to fetch and show all the Plan Type of John Smith who has same SSN. Please assit. I'm attaching my code what I've written to show only one
record. All the four plan type of John Smith should come here.
I have a requirement to show few fields from multiple records who has same SSN in ligtning record edit form. Currently I'm able to show to only one record. eg: There is four records of John Smith with the same SSN but Plan Type( Custom Field) is different in all the records. So I've to fetch and show all the Plan Type of John Smith who has same SSN. Please assit. I'm attaching my code what I've written to show only one
record. All the four plan type of John Smith should come here.
<lightning-record-edit-form record-id={recordid} object-api-name="Benefits__c" class="custom-font" onsuccess={handleSuccessCOB} columns="2" layout-type="Full" > <lightning-messages> </lightning-messages> <!---- <div class="slds-box">--> <div class="slds-grid slds-align_absolute-center" style="font-weight: bold"> <template class="slds-col slds-size_1-of-2" for:each={fields_COB1} for:item="section" > <template for:each={section.fields} for:item="fieldFromSection"> <!--template if:true={COBEdit}--> <lightning-input-field class="text" style="width:70%" key={fieldFromSection} field-name={fieldFromSection} > </lightning-input-field> <!--/template--> <!--template if:false={COBEdit}--> <!--<lightning-output-field alignment-bump="left" class=" left-align" style="text-align: left;" key={fieldFromSection} field-name={fieldFromSection} > </lightning-output-field>--> <!--/template--> </template> </template> </div> <div class="slds-align_absolute-center"> <lightning-button type="submit" variant="brand" label="Save" style="font-size: 14px;" title="Save" class="slds-m-left_x-small"> </lightning-button> </lightning-record-edit-form> JS- fields_COB1 = [ { label: "COB", fields: [ "COB_Plan_Type__c", "COB_sub_plan_type__c", ] } ];