jbussek
I'm new here

How to retrieve a Subfolder of scripts? (&importStoreElements)

Jump to solution

I'm currently struggling with something that generally appears like a simple task to me:

When trying to retrieve a subfolder of the TemplateStore's scripts folder there seems to be no matching UidType to use within getStoreElement. How do I retrieve a subfolder of the scripts folder?

Linked to this question: When importing Scripts into the scriptFolder by using importStoreElements with an export zip file provided, folders contained within the export zip seem to be created with the same reference name, even if they already exist with the reference name defined within the export zip. How do I prevent this behaviour?

0 Kudos
1 Solution

Accepted Solutions
stephan
I'm new here

You can't get a subfolder of the TemplateStore by UID, as those elements have no real UID (it is not unique a this point). You experienced this circumstance while importing an export zip - the uid is not patched by FirstSpirit during the import and the there is a duplicate of the original uid. I don't think there is a way to disable this functionality, as it is core.

You can however get a subfolder of the TemplateStore if you know the ID of the element using Store.getStoreElement(long id).

best regards

Jörg

View solution in original post

0 Kudos
1 Reply
stephan
I'm new here

You can't get a subfolder of the TemplateStore by UID, as those elements have no real UID (it is not unique a this point). You experienced this circumstance while importing an export zip - the uid is not patched by FirstSpirit during the import and the there is a duplicate of the original uid. I don't think there is a way to disable this functionality, as it is core.

You can however get a subfolder of the TemplateStore if you know the ID of the element using Store.getStoreElement(long id).

best regards

Jörg

0 Kudos