0

I am getting the following error when attempting to delete a lightning resource bundle.

Cannot complete this operation. Referenced by a component instance inside the Lightning Page Home : Lightning Page

From what I understand this means that I am referencing the bundle that I am trying to delete somewhere in "Lightning Page Home". However, I have removed all custom lightning components from the default home page and I am still receiving the error.

I feel like I am missing something basic here, any help would be appreciated.

I am not sure if it is relevant, but below is the code that I am trying to delete.

<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId"> 

<aura:attribute name="accountRecord" type="Object" /> <aura:attribute name="recordSaveError" type="String" />

<force:recordData aura:id="recordEditor"
    layoutType="FULL"
    recordId="{!v.recordId}"
    fields="Name"
    targetError="{!v.recordSaveError}"
    targetRecord="{!v.accountRecord}"
    targetFields="{!v.accountRecord}"
    recordUpdated="{!c.recordUpdated}" 
    mode="EDIT" />
        <ui:outputText value="Edit Account" />

    <div class="slds-form--stacked">
        <div class="slds-form-element">
            <label class="slds-form-element__label" for="recordName">Name: </label>
            <div class="slds-form-element__control">
              <ui:outputText value="{!v.accountRecord.Name}" class="slds-input" aura:id="recordName"/>
            </div>
        </div>
    </div>


    <aura:if isTrue="{!not(empty(v.recordSaveError))}">
        <div class="recordSaveError">
            <ui:message title="Error" severity="error" closable="true">
                {!v.recordSaveError}
            </ui:message>
            Error: <ui:outputText value="{!v.recordSaveError}"/>

        </div>
    </aura:if>

    <lightning:input aura:id="recordName" name="recordName" label="Account Name"
                  value="{!v.accountRecord.Name}" required="true"/>

     <ui:button label="Save Account"/>    </aura:component>
2
  • 1
    Go to Setup--> Lightining app builder --> see if there is/are page of type "Home page" --> click Edit --> check if the above referenced component that you are trying to delete is part of this app layout – Rao Sep 26 '17 at 21:50
  • It is also possible that you have a component that is referencing the component you wish to delete. Make sure there are no references to it anywhere in the codebase, not just in the Home Page. – Sebastian Kessel Sep 26 '17 at 23:26
3

Rao was correct on this. There was another page layout that was attempting to use the component.

Go to Setup--> Lightining app builder --> see if there is/are page of type "Home page" --> click Edit --> check if the above referenced component that you are trying to delete is part of this app layout

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.