Skip to main content
Brainy
Sep 25, 2024 10:34 AM UTC
Question

Document ID changed when deploying a document to a higher environment

When we deploy a document from a lower environment to a higher environment, its ID is getting changed. Due to this, constant points to invalid/wrong a document. 

We are using direct deployment (Compare & Deploy)

Is it expected behavior?

7 replies

shubhama926776
Brainy
Sep 25, 2024 11:36 AM UTC

[mention:c3d4bf332aba4695885fdc0e0110ec6e:e9ed411860ed4f2ba0265705b8793d05] 
This is expected behaviour to maintain environment isolation and prevent conflicts.
I would recommend you put that document into a constant and use that constant.

शुभम्
yogip3177Author
Brainy
Sep 25, 2024 11:59 AM UTC

Yes, replaced the document ID with a document in constant.

Thanks for your reply.

kumara0180
Participating Frequently
Sep 25, 2024 12:10 PM UTC

rule of thumb, IDs changes from one environment to another environment. UUID remain same across environment. 

mikes0011
Brainy
Sep 25, 2024 12:28 PM UTC

Constants (of "document" type) which point to a specific document, should still point to the correct document after deployment to another environment, regardless of the fact that the deployed copy of the document will have a new/different underlying DocId.  If you're seeing something other than this, then you might need to open a support case with Appian Support.

The Expression Guru
stefanhelzle0001
Brainy
Sep 26, 2024 6:27 AM UTC

That constant, is that a number? If yes, change it to the type "Document". It will then reference the UUID and become stable across deployments.

somasundaram.d
Employee
Sep 26, 2024 7:26 AM UTC

It should work when you have the document object in document type constant.

davidj137213
Brainy
Sep 26, 2024 7:27 AM UTC

Yes, this is the expected behavior... Because the document instance is different in the new environment. Reference the document instead of its ID and it will work.