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
Jörn Flath 15Jörn Flath 15 

How to deploy process with queue assignment?

Hello together,

I have a Process Builder Process with an Assignment to a queue:
Process Builder Action with Queue Assignment

On this environment it works as expected. When I retrieve this process from the org via CLI into VS Code there is the actual Queue ID in the Metadata XML file in line 265:

User-added image

So as soon as I deploy this process to another org and try to execute it, obviously, I get a "INVALID_CROSS_REFERENCE_KEY: invalid cross reference id" error.

Is there a way to deploy a process like this with queue assignment?

Best Answer chosen by Jörn Flath 15
Jörn Flath 15Jörn Flath 15

@Abhishek:

This Idea doesn't really refer to my question, because this kind of behaviour (that the IDs are different from Org to Org) is expected. But if you create a process and put in the Queue Name, then you should expect that the name is being resolved during runtime.

But I found a help article (https://help.salesforce.com/articleView?id=000319848&language=en_US&type=1&mode=1), so this seems to be a feature and not a bug :D

@Abhishek Bansal:

As we not only have one developer org (where we create processes and do the development) and one production org, but have multiple Developer Sandboxes, an Integration Sandbox, a Testing Sandbox and a Production Org, this solution is not viable.


So either use Custom Settings for the IDs and refer to them in the Process or use Flow/Apex to query the queue via the Developer Name.

All Answers

AbhishekAbhishek (Salesforce Developers) 
Is this Idea related to your query?

https://trailblazer.salesforce.com/ideaView?id=08730000000YtaDAAS
Abhishek BansalAbhishek Bansal
Hi Jorn,

Create the Queue in Production and replace the Id in this XML file with the production queue id. In this way you can complete the deployment.
You can upvote the above idea as this is something which Salesforce needs to deal with.

Thanks,
Abhishek Bansal.
Jörn Flath 15Jörn Flath 15

@Abhishek:

This Idea doesn't really refer to my question, because this kind of behaviour (that the IDs are different from Org to Org) is expected. But if you create a process and put in the Queue Name, then you should expect that the name is being resolved during runtime.

But I found a help article (https://help.salesforce.com/articleView?id=000319848&language=en_US&type=1&mode=1), so this seems to be a feature and not a bug :D

@Abhishek Bansal:

As we not only have one developer org (where we create processes and do the development) and one production org, but have multiple Developer Sandboxes, an Integration Sandbox, a Testing Sandbox and a Production Org, this solution is not viable.


So either use Custom Settings for the IDs and refer to them in the Process or use Flow/Apex to query the queue via the Developer Name.

This was selected as the best answer