How to create a copy of a TN doc type from designer?

Hi, everyone!

I was trying to retrieve a doc type from TN, make some changes to it and save it to a TN as a new doc type(while leaving the original TN doc type intact).

I tried to do it this way:

wm.tn.doctype:view - to retrieve certain doc type.
MAP - to replace some values of the fields.
wm.tn.doctype:add - to upload the new doc type to the TN.

Unfortunately, this way only the original doc type gets modified. And the new copy does not get generated.

Hi Tom,

can you provide a bit more detailed outline (with screenshots?) of your usecase, please?
Remember to provide a new name to the new doctype while adding otherwise it is likely to overwrite the original one (as you described).

Regards,
Holger

Hi Holger,

Thats what I made:
image

A few ways I tried to solve the problem:

  1. In the map step I tried to replace Name, Id and other values of the doc type I received from VIEW step. But those changes for some reason instantly modify the original doc type, that is stored on the TN(even without invoking ADD step).

  2. I tried to copy the values of the doc type I receive from VIEW, to a new document(this document is referencing BizDocType, so it should be okay). And then I tried to modify the new document(change values of fields like Name and ID). Those changes also instantly modified the original doc type, that is being stored on the TN(even without invoking ADD step on the copied document).

Hi Tom,

just another question:
What would be the use case for creating doc types programmatically from another existent doc type?

Regards,
Holger

Hi Holger,

Use case: I just needed to be able to create new TN doc types from designer.

I thought it could be done by just copying an existing TN doc type, modifying it and sending it back to TN.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.