P
P
panikev2018-11-20 13:21:51
1C
panikev, 2018-11-20 13:21:51

How to change guid in 1s?

Hello! Can you please tell me if I can somehow change the GUID of the element through processing? I did not find this in the Requisites, I could only pull out with the UniqueIdentifier () command ...
5bf3e03a2607c656449399.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kinash, 2018-11-20
@Dementor

Answer: No!
Reason: What is a directory link? This is the directory type and this same GUID. Another GUID is another link. If the database contains directories, documents or other entities that refer to your directory element, then even after physical removal from the database, when all these links become "broken", you can find out the initial GUID from each of them.
Output:What if you really need it? If necessary, then you can. You need to use the FindByReferences() function or your own code to find all links to your element. Next, create a new element in the database with the data of the original element, to which, using SetLinkNew(), set the link generated using GetLink() based on your GUID, and then write it down. And finally, make a replacement in the entire database according to the previously obtained list of the old link to the new one, after which the old element can be completely removed from the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question