Expand my Community achievements bar.

SOLVED

Retaining document UUID while replacing document with same another document having same name

Avatar

Level 2

I have a document with name 'test' which have uuid as 03dc83f9-c9b4-4827-9994-04e7a77c4045 but when I replace document with other document having same name its uuid is change to 4f76908f-c00a-479b-95fa-ce2dba99226c .Is there any way to retain same uuid since I am using document uuid in other application and due to mismatch it is not working properly when someone replace document.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@shivamra 

The UUID allocation is not a UI operation. Its on repository level. You would not be able to customize it via UI.

 

Moreover, replace is kind-of "delete -> create", thus you even loose the metadata.

 

You are using UUID for any customization, you should probably put random number as a metadata, and avoid replace. Rather use "Create Version", which will retain the metadata.

 


Aanchal Sikka

View solution in original post

6 Replies

Avatar

Community Advisor

@shivamra : Please refer this:-https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-uuid/m-p/279555

As per this, it is not advisable to rely on uuid property and it may not be based on the document name (AEM has its own logic to generate it). Even when you delete the original document and upload the same document again, it will generate a different jcr:uuid property value for it.

UUIDs are implementation details of the repository, and I would never reference them from an external system.

 thanks.

Avatar

Level 2

Hi @Kamal_Kishor Is there any way I can customize replace button behaviour of changing UUID for the files having same name. Just want to know if we can carry forward the uuid from old document and assign it to new document with whom we are replacing it with.

Avatar

Correct answer by
Community Advisor

@shivamra 

The UUID allocation is not a UI operation. Its on repository level. You would not be able to customize it via UI.

 

Moreover, replace is kind-of "delete -> create", thus you even loose the metadata.

 

You are using UUID for any customization, you should probably put random number as a metadata, and avoid replace. Rather use "Create Version", which will retain the metadata.

 


Aanchal Sikka

Avatar

Community Advisor

Hi @shivamra 

 

If this an AEM Guides implementation, can you confirm if you have setup your AEM repository as UUID build or non-UUID build - https://experienceleague.adobe.com/docs/experience-manager-guides/using/release-info/latest-release-...

 

Thanks

Narendra

Avatar

Administrator

@shivamra Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni