Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
When I tried to delete Project it showed, "Cannot delete project 'xx' since it is referenced by one or more entities".
So tried to delete all the entities using the custom service below: Now getting this error while executing the service, "Error executing service trialdeletingentities. Message :: Cannot Delete This Entity - It Is Referenced By 3 Other Entities - See Script Error Log for more details."
Now what are the other ways to delete the project.?
var params = {
infoTableName : "InfoTable",
dataShapeName : "EntityReference"
};
var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);
result= Projects["XXXXX"].GetEntities();
for( var i=0;i<result.length;i++)
{
if(result[i].type=='Thing')
{
Resources["EntityServices"].DeleteThing({
name: result[i].name /* THINGNAME */
});
}
else if (result[i].type=='Thing Shape')
{
Resources["EntityServices"].DeleteThingShape({
name: result[i].name
});
}
else if (result[i].type=='Thing Template')
{
Resources["EntityServices"].DeleteThingTemplate({
name: result[i].name
});
}
else if (result[i].type=='Media')
{
Resources["EntityServices"].DeleteMediaEntity({
name: result[i].name
});
}
}
@AP_9587236 : Which version of thingworx are you using? If you open the project in composer , there you can see the entities which are present for the project . You can delete the entities from here and do not require any custom service .
The version is 8.4.2. There are more than 700 entities in a project. During import, only 400 entities imported. Due to this presence of incomplete project, Source Control import is getting failed. So i need to delete this project to proceed with the source control import.
Hi @AP_9587236
Is it possible you failed to install a required extension prior to attempting the import? Have you checked the Application and Error logs for the dependencies that are missing to ensure a successful import?
If you're unable to make any progress, if you have support, we can open a support case so an engineer can assist.
Regards.
--Sharon