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
Shyamala VaradharajanShyamala Varadharajan 

Facing 'invalid cross-reference id' error while deploying Custom Application

When deploying a Custom app with profileOverrides present, the profile names contain symbols like '-' the deployment is getting failed with 'invalid cross-reference id' as the error.
       This is the place I face error.
       
       <profileActionOverrides>
        <actionName>Tab</actionName>
        <content>Title_Dashboard</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>standard-home</pageOrSobjectType>
        <type>Flexipage</type>
        <profile>XXX - Librarian Profile</profile>
        </profileActionOverrides>
        
        How to sort it out. Please Help.
Best Answer chosen by Shyamala Varadharajan
SwethaSwetha (Salesforce Developers) 
This is a known issue in salesforce. See https://trailblazer.salesforce.com/issues_view?id=a1p3A000000mCnsQAE which says that Special Characters like '+' when included in Name of a profile being deployed in an App can cause 'invalid cross-reference id' error
 

This is due to URLDecoder.decode(name, "UTF-8"); being used to convert the name, that changes the + character to a space in the backend.


If this information helps, please mark the answer as best. Thank you

All Answers

SwethaSwetha (Salesforce Developers) 
HI Shyamala,

Looks like custom app component is having this profile reference in profileActionOverrides which isn't part of the deployment and the target org. 

See related: https://trailblazer.salesforce.com/issues_view?id=a1p3A000000mCIdQAM&title=invalid-cross-reference-id-deploying-custom-app-with-profileactionoverrides-referencing-new-profiles-in-same-deployment

Thank you
Shyamala VaradharajanShyamala Varadharajan
Hi Sweta,

Thank you for your response. This profile and Custom App is already existing in the target environment. I'm facing this error while trying to deploy components. If I tried with the Admin profile I didnt face this issue.Its happening only for this profile.
SwethaSwetha (Salesforce Developers) 
This is a known issue in salesforce. See https://trailblazer.salesforce.com/issues_view?id=a1p3A000000mCnsQAE which says that Special Characters like '+' when included in Name of a profile being deployed in an App can cause 'invalid cross-reference id' error
 

This is due to URLDecoder.decode(name, "UTF-8"); being used to convert the name, that changes the + character to a space in the backend.


If this information helps, please mark the answer as best. Thank you
This was selected as the best answer