2

I have a custom LWC Page which is used as Public site.

On this lwc, I have a form to populate data in contact object. I have one custom object called school this is the look up filter field in Contact object.

When i tried to Use the School look up filter in my page, It doesn't display anything in the page. Is there anything which i have missed.Please guide me.

 <lightning-record-edit-form object-api-name="Contact">
 <div class="slds-text-align_center slds-m-around_x-small">
                                                    <label for="fieldid">School</label>
                                                    <lightning-input-field id="schoolId" required={required}
                                                        variant="label-hidden" field-name="School__c"
                                                        value={schoolValue} onchange={handleChange}>
                                                    </lightning-input-field>
                                                </div>
 </lightning-record-edit-form>
  • Does the "Guest User" have Field Level Security set up for this field? Do they have access to the School__c object? What about the Contact object? Why are you overriding the label and providing your own? – sfdcfox May 5 '20 at 11:01
  • Yes Guest User have Read and Edit access for School Object Fields, I can able to create and Edit the other fields in Contact object. – user3214361 May 5 '20 at 11:12
  • 1
    Are you trying to use lookup field in the component? lookup field is not available as out of box in lightning component (aura and lwc both). You may need to create your own custom lookup – Manish Anand May 5 '20 at 11:23
3

You need a custom lookup component. Below is one of the best open source implementation so far:

https://github.com/pozil/sfdc-ui-lookup-lwc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.