Skip to main content
12-Amethyst
August 24, 2021
Question

Error using Resources["EntityServices"].CloneThing(params)

  • August 24, 2021
  • 1 reply
  • 1926 views

This seems to be a bug which we have recreated in 9.1.1

1 reply

16-Pearl
August 25, 2021

@DuanGauche_367032 , I test it with the below code in 9.2.1, it works fine. What is the exact code and error in your site?

//==========

let params = {
name: "Test_Cloned_Target_Thing" /* STRING */,
description: "This is cloned Thing" /* STRING */,
sourceThingName: "testcloneSourceThing" /* THINGNAME */,
tags: undefined /* TAGS */
};

// no return
Resources["EntityServices"].CloneThing(params);

 

//==========

12-Amethyst
August 27, 2021

Supposedly 9.2.1 fixes a lot, but we will need to see that.

 

This article claims: "CloneThing Service from Resources EntityServices should be used for creating exact copy of the Thing including the data" - https://www.ptc.com/en/support/article/CS272038

 

@Jimwang  could you please verify that the persisted property data is also copied?

 

Thanks,

Duan

16-Pearl
September 6, 2021

@DuanGauche_367032 , I tested it that the persisted property data is NOT copied . I add comments to the article CS272038 for waiting for their verification.