Upgrading legacy documents to become Templafy updater enabled

Modified on Mon, 5 Oct at 1:54 PM

This functionality is a combination of commands and is meant to provide the ability to convert old documents to Templafy DCU compatible documents.

Module is available here:

Code
Git\Ericsson\SDUP_Templafy\files\ProgramData\OfficeExtensions\Modules\010_nocontext_Legacy\upgrade-legacy.xml

Combination of commands

Save as OpenXML:

XML
<Cmd case="BaseExtensions:save-as-openxml"/>

This command ensures that the document is saved as OpenXML.

Add custom XML:

XML
<Cmd case="BaseExtensions:AddCustomXml">
  <!--xml here-->
</Cmd>

AddCustomXml is supposed to be used twice to include first the TemplafyFormConfiguration and then the TemplafyTemplateConfiguration. These can be found in the Templafy task pane: Settings -> Advanced Configuration.

They must be enclosed in either the <TemplafyFormConfiguration> tag or the <TemplafyTemplateConfiguration> tag.

Create document properties:

XML
<Cmd case="BaseExtensions:content-create" type="document-property" name="TemplafyTenantId" value="ericsson"/>
<Cmd case="BaseExtensions:content-create" type="document-property" name="TemplafyTemplateId" value="636904937100485859"/>
<Cmd case="BaseExtensions:content-create" type="document-property" name="TemplafyUserProfileId" value="636945408975716254"/>
<Cmd case="BaseExtensions:content-create" type="document-property" name="UpgradedFromLegacy" value="1"/>

TemplafyTenantId is the prefix from the site, e.g. in xyz.templafy.com the tenant id is xyz.
TemplafyTemplateId is the id of the asset (template) that it “replicates”.
TemplafyUserProfileId is the id of the user who should be the creator. This is not visible anywhere.
UpgradedFromLegacy is simply included for convenience.

This combination of commands can be used to add the necessary Templafy parts.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article