• Gurditta Garg 16
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I have a publicly available page through salesforce sites. It was working before our sandbox got upgraded to Spring 2020 release. In order to replicate the problem a salesforce site needs to be created. The LWC will be embedded within salesforce site VFP.

I gave the external user access to Case object (read/edit) and visibility of fields to be displayed.

I get identical issue with aura component "lightning:recordEditForm" and LWC "lightning-record-edit-form".

I could replace the lightning-record-edit-form with input fields, however, it makes things complicated with dependent picklists.


VFP:
<apex:page standardStylesheets="false" applyBodyTag="false" sidebar="false" showHeader="false">
    <apex:includeLightning />
    <div id="container"></div>
    
    <script>
    $Lightning.use("c:Site_LWC_Viewer_App", function()
    {
        $Lightning.createComponent(
            "c:testLWC",
            {'greeting':'Somnath'},
            "container",
            function(cmp)
        {
            console.log('component created');
        });
    });
    </script>
</apex:page>

AURA APP - "Site_LWC_Viewer_App":
<aura:application extends="ltng:outApp" access="GLOBAL" implements="ltng:allowGuestAccess">
</aura:application>

LWC - "testLWC":
<template>
    <lightning-record-edit-form object-api-name="Case">
        <lightning-messages></lightning-messages>

        <lightning-input-field field-name="Subject"></lightning-input-field>
        
        <lightning-button   class="slds-m-top_small"
                            type="submit"
                            label="Create new">
        </lightning-button>
    </lightning-record-edit-form>
</template>

​​​​​​​ERROR:
Error Message