0

Im trying to place a custom object lookup on a page. its working as a standalone component but not working when i keep in an existing LWC component

Lookup code:

<div>
<lightning-record-edit-form
object-api-name="ISF_Form_Request__c"
id="createCompForm"
>
<lightning-input-field
field-name="WD_Worktags__c"
variant="label-hidden"
onchange={handleAccountSelection}
required
>
</lightning-input-field>
</lightning-record-edit-form>

</div>

Existing component has a section with

<lightning-layout multiple-rows="true" horizontal-align="spread"> <lightning-layout-item size="12" medium-device-size="6" padding="around-small" \> <lightning-input type="text" label="Text ID" max-length="10" class="initiatorUSCIdInput" required value={fRequest.Initiator\_\_ID\_\_c} disabled \> </lightning-input> </lightning-layout-item>

Im confused of how to place my lookup code in this section

Just so you know when i tried the below code for standard object in the existing LWC component it worked fine ex:

<div
class="slds-box slds-p-top_small"
style="background-color: white"
>
<lightning-record-edit-form
object-api-name="Contact"
id="createContactForm"
>
<lightning-input-field
field-name="AccountId"
variant="label-hidden"
onchange={handleAccountSelection}
required
>
</lightning-input-field>
</lightning-record-edit-form>

</div>

1 Answer 1

0

Per the documentation for lightning-layout-item: You can place HTML tags and text between the lightning-layout-item components, but you can't place other components or expressions between them. https://developer.salesforce.com/docs/component-library/bundle/lightning-layout/documentation

You can utilize the slds-grid class and styling to replicate the layout functionality: https://www.lightningdesignsystem.com/utilities/grid/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .