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
zubair shareef mohammadzubair shareef mohammad 

Error in LIGHTNING

Hi this is ZUBER,
              I am getting this error while i am executing my code please any one help me to overcome this error
"This page has an error. You might just need to refresh it. Error during init [This application contains a reference to the force:record component, which is not supported by this application.]"
Thanks
brahmaji tammanabrahmaji tammana
Please post your controller and component code here
zubair shareef mohammadzubair shareef mohammad
Hi this is my code
<aura:component implements="flexipage:availableForRecordHome,force:lightningQuickActionWithoutHeader,force:hasRecordId">
    <aura:attribute name="record" type="Object"/>
    <aura:attribute name="recordError" type="String"/>
    <force:recordPreview aura:id="recordLoader" recordId="{!v.recordId}"  layoutType="FULL" targetRecord="{!v.record}" targetError="{!v.recordError}" />
    <div class="slds-page-header" role="banner">
    <p class="slds-text-heading--label">{!v.record.Name}</p>
    <h1 class="slds-page-header__title slds-m-right--small slds-truncate slds-align-left">{!v.record.BillingCity}, {!v.record.BillingState}</h1>
    </div>    
    <aura:if isTrue="{!not(empty(v.recordError))}">
    <div class="recordError">
    <ui:message title="Error" severity="error" closable="true">
    {!v.recordError}
    </ui:message>
    </div>
    </aura:if>
    </aura:component>
brahmaji tammanabrahmaji tammana

Hi Zubair,

I think you are testing this component from App.

force:recordPreview can only be seen in Quick Action or App Builder. So it is better you add this component in the record page by click on Edit Page then you will be able to verfiy the changes.

THanks

 Brahma

brahmaji tammanabrahmaji tammana
Still a doubt, let us know. Thanks