• Richard Wang 182
  • NEWBIE
  • 25 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I’m attempting to migrate metadata from one org to another using a package.  But my deployment keeps failing with “Error  test/applications/Underwriting.app  Underwriting  invalid cross reference id”

Originally I was all three .app files in my metadata package were failing.  Then I did something (IDK what – I tried a bunch of stuff) that got two of the .app files to deploy and only one is failing now.

Looking at what changed in the .app files that failed but now deploy without error, I notice they no longer contain references to many standard profiles.  They only reference custom profiles and the Admin profile.  No other standard profiles besides Admin.

Also, if I look at the .app files that continues to cause problems, I see that it contains references to many if not all of the standard profiles.  As a result, I suspect it is the inclusion of these standard profiles that is causing problems.

I thought the fix would be easy: go to Setup > App Manager > App Settings > User Profiles, move the standard profiles from the Selected Profiles column to the Available profiles column and then update the package.

The problem is that it does not seem that changes I make to App Manager > App Settings > User Profiles are reflected in the .app metadata files in my package.

Removing standard profiles from the app with the .app file producing the error does not remove them from the .app metadata file.  Similarly, adding standard profiles to the apps whose .app files do not contain standard profiles does not add the selected standard profiles to these .app files.

This has left me perplexed.  Is the issue the standard profiles in the .app file?  If not App Manager > App Settings > User Profiles, how do I control which profiles appear in my .app files? 

Note: I’ve searched for similar errors / possible solutions.  The first link below sounds most similar but it’s marked as a “fixed” known issue as of a year ago so I don’t think that’s the issue.  The second link says there’s an invalid record ID in my code.  But the error messages I get identify the files producing the error and I’m 100% positive they do not contain any record (or other IDs).

https://success.salesforce.com/issues_view?id=a1p3A000000mCIdQAM&title=invalid-cross-reference-id-deploying-custom-app-with-profileactionoverrides-referencing-new-profiles-in-same-deployment (https://success.salesforce.com/issues_view?id=a1p3A000000mCIdQAM&title=invalid-cross-reference-id-deploying-custom-app-with-profileactionoverrides-referencing-new-profiles-in-same-deployment" style="color:blue; text-decoration:underline)

https://developer.salesforce.com/forums/?id=906F0000000BIhXIAW (https://developer.salesforce.com/forums/?id=906F0000000BIhXIAW" style="color:blue; text-decoration:underline)