0

I'm trying to create an unlocked package version using sfdx force:package:version:create that contains Custom App metadata (among other metadata).

However I'm receiving the following error for the apps and I can't seem to determine why (google isn't producing many helpful results): invalid cross reference id. XML below for reference. For reference I do have profiles included in this package which I hoped would help this issue but still it persists. Thoughts?

<?xml version="1.0" encoding="UTF-8"?>
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
    <actionOverrides>
        <actionName>View</actionName>
        <comment>Action override created by Lightning App Builder during activation.</comment>
        <content>Buyer_Renter_Opp_DXB</content>
        <formFactor>Large</formFactor>
        <skipRecordTypeSelect>false</skipRecordTypeSelect>
        <type>Flexipage</type>
        <pageOrSobjectType>Opportunity</pageOrSobjectType>
    </actionOverrides>
    <brand>
        <headerColor>#000000</headerColor>
        <logo>avatarprimarywhite</logo>
        <logoVersion>1</logoVersion>
        <shouldOverrideOrgTheme>true</shouldOverrideOrgTheme>
    </brand>
    <description>Internal tooling for mycompany Ops team</description>
    <formFactors>Large</formFactors>
    <isNavAutoTempTabsDisabled>false</isNavAutoTempTabsDisabled>
    <isNavPersonalizationDisabled>false</isNavPersonalizationDisabled>
    <isNavTabPersistenceDisabled>false</isNavTabPersistenceDisabled>
    <label>mycompany mylocation</label>
    <navType>Standard</navType>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Contact_Consumer</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Contact</pageOrSobjectType>
        <recordType>Contact.Consumer</recordType>
        <type>Flexipage</type>
        <profile>Admin</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Transaction_Record_Page</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Transaction__c</pageOrSobjectType>
        <type>Flexipage</type>
        <profile>Admin</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Transaction_Record_Page</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Transaction__c</pageOrSobjectType>
        <type>Flexipage</type>
        <profile>Standard</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Transaction_Record_Page</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Transaction__c</pageOrSobjectType>
        <type>Flexipage</type>
        <profile>mycompany mylocation</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>mycompany_Consumer_Record</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Contact</pageOrSobjectType>
        <type>Flexipage</type>
        <profile>Admin</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Tower_Record_Page1</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Tower__c</pageOrSobjectType>
        <recordType>Tower__c.location</recordType>
        <type>Flexipage</type>
        <profile>mycompany mylocation</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Tower_Record_Page1</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Tower__c</pageOrSobjectType>
        <recordType>Tower__c.location</recordType>
        <type>Flexipage</type>
        <profile>Admin</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Person_Account</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Account</pageOrSobjectType>
        <recordType>PersonAccount.PersonAccount</recordType>
        <type>Flexipage</type>
        <profile>Admin</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Person_Account</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Account</pageOrSobjectType>
        <recordType>PersonAccount.PersonAccount</recordType>
        <type>Flexipage</type>
        <profile>mycompany mylocation</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Tower_Record_Page1</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Tower__c</pageOrSobjectType>
        <type>Flexipage</type>
        <profile>Admin</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Tower_Record_Page1</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Tower__c</pageOrSobjectType>
        <type>Flexipage</type>
        <profile>mycompany mylocation</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Buyer_Renter_Opp_DXB</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Opportunity</pageOrSobjectType>
        <recordType>Opportunity.Consumer_Transaction</recordType>
        <type>Flexipage</type>
        <profile>mycompany mylocation</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Buyer_Renter_Opp_DXB</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Opportunity</pageOrSobjectType>
        <recordType>Opportunity.Consumer_Transaction</recordType>
        <type>Flexipage</type>
        <profile>Admin</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Buyer_Renter_Opp_DXB</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Opportunity</pageOrSobjectType>
        <recordType>Opportunity.Consumer_Transaction</recordType>
        <type>Flexipage</type>
        <profile>Integration</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Buyer_Renter_Opp_DXB</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Opportunity</pageOrSobjectType>
        <recordType>Opportunity.Consumer_Transaction</recordType>
        <type>Flexipage</type>
        <profile>mycompany mylocation Sales</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Case_Record_Page</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Case</pageOrSobjectType>
        <type>Flexipage</type>
        <profile>Admin</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Case_Record_Page</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Case</pageOrSobjectType>
        <type>Flexipage</type>
        <profile>mycompany mylocation</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>PB_Opportunity_Record</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Opportunity</pageOrSobjectType>
        <recordType>Opportunity.Partner_Brokerage</recordType>
        <type>Flexipage</type>
        <profile>Admin</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>PB_Opportunity_Record</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Opportunity</pageOrSobjectType>
        <recordType>Opportunity.Partner_Brokerage</recordType>
        <type>Flexipage</type>
        <profile>mycompany mylocation</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Buyer_Renter_Opp_DXB</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Opportunity</pageOrSobjectType>
        <recordType>Opportunity.Consumer_Transaction</recordType>
        <type>Flexipage</type>
        <profile>mycompany Developer</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Partner_Brokerage</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Account</pageOrSobjectType>
        <recordType>Account.Brokerage</recordType>
        <type>Flexipage</type>
        <profile>mycompany mylocation</profile>
    </profileActionOverrides>
    <profileActionOverrides>
        <actionName>View</actionName>
        <content>Partner_Brokerage</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Account</pageOrSobjectType>
        <recordType>Account.Brokerage</recordType>
        <type>Flexipage</type>
        <profile>Admin</profile>
    </profileActionOverrides>
    <tabs>standard-Account</tabs>
    <tabs>standard-Opportunity</tabs>
    <tabs>standard-Task</tabs>
    <tabs>Transaction__c</tabs>
    <tabs>standard-report</tabs>
    <tabs>standard-Dashboard</tabs>
    <tabs>Notification__c</tabs>
    <tabs>Notification_Preference__c</tabs>
    <uiType>Lightning</uiType>
    <utilityBar>mycompany_UtilityBar</utilityBar>
</CustomApplication>

2 Answers 2

0

I encountered the same error and based on the answer in here, I'm going to remove the lines referencing profileActionOverrides from the customApplication. The app itself will stay in that stripped version in the package directory, but the full version will be deployed as a post-deployment step together with the - in my case custom - profiles.

I do not like this solution but for the moment I sadly have not better one, since the handling of profiles together with packages continues to be just pain.

It is not directly related to this, but this open issue helped me a lot to understand how the CLI handles profiles during package version creation.

0

I had the same issue, this is because I added all the profiles to .forceignore:

myProj/main/default/Profiles/**

and in my custom app I was using profileActionOverrides.

Removing the entry from .forceignore or removing profileActionOverrides resolved the issue.

You must log in to answer this question.

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