אויב איר באַקומען “פּלאַץ אינהאַלט טיפּ אין ניצן” טעות בשעת דיליטינג די צופרידן טיפּ.
טוישן די פעליקייַט צופרידן טיפּ פֿאַר דער רשימה / ביבליאָטעק, וואָס ניצט דעם צופרידן טיפּ.
דעמאָלט פּרובירן צו אויסמעקן די צופרידן טיפּ.
|
||||||
פּלאַץ אינהאַלט טיפּע אין ניץ - פֿעלער בשעת דעלעטינג אינהאַלט טיפּעאויב איר באַקומען “פּלאַץ אינהאַלט טיפּ אין ניצן” טעות בשעת דיליטינג די צופרידן טיפּ.
טוישן די פעליקייַט צופרידן טיפּ פֿאַר דער רשימה / ביבליאָטעק, וואָס ניצט דעם צופרידן טיפּ. דעמאָלט פּרובירן צו אויסמעקן די צופרידן טיפּ. 2 comments to Site Content Type in Use – Error while Deleting Content Typeלאָזן אַ ענטפֿערן |
||||||
דרוקרעכט © 2024 מסטעטשבלאָגס - אַלע הזכויות רעסערוועד פּאַוערד דורך וואָרדפּרעסס & אַטאַהואַלפּאַ |
How to find in which libraries this content type is used?
Refer to the discussion in my forum :
http://www.mstechblogs.com/Forums/viewtopic.php?f=8&p=12&sid=cee7f065bed1fc88d9759c66b373d4dd#p12
You can use Object Model to find :
ניצן סיסטעם;
ניצן סיסטעמ.קאָללעקטיאָנס.גענעריק;
ניצן מיקראָסאָפט.שאַרעפּאָינט;
namespace Test
{
class ConsoleApp
{
static void Main(שטריקל[] args)
{
ניצן (SPSite siteCollection = new SPSite(“הטטפּ://לאָקאַלהאָסט”))
{
ניצן (SPWeb webSite = siteCollection.OpenWeb())
{
// Get the obsolete content type.
SPContentType obsolete = webSite.ContentTypes[“Test”];
צי (obsolete != 0) // We have a content type. usages = SPContentTypeUsage.GetUsages(obsolete);
{
IList
צי (usages.Count > 0) // It is in use.
{
קאָנסאָלע.ווריטעלינע(“The content type is in use in the following locations:”);
פאָרעאַטש (SPContentTypeUsage usage in usages)
קאָנסאָלע.ווריטעלינע(usage.Url);
}
אַנדערש // The content type is not in use.
{
// Delete it.
קאָנסאָלע.ווריטעלינע(“Deleting content type {0}…”, obsolete.Name);
webSite.ContentTypes.Delete(obsolete.Id);
}
}
אַנדערש // No content type found.
{
קאָנסאָלע.ווריטעלינע(“The content type does not exist in this site collection.”);
}
}
}
Console.Write(“\nPress ENTER to continue…”);
Console.ReadLine();
}
}
}
Other Option would be using SQL query (beware its bit risky)
SELECT *
FROM AllUserData
WHERE (tp_DirName LIKE ‘%’)
AND ((tp_ContentType = ‘Document’) and tp_ListId=’C8723B19-0DAB-4F19-B195-3399D5375752′)
You will find items referenced by content type. Delete this referenced items using query below.
DELETE
FROM AllUserData
WHERE (tp_DirName LIKE ‘%’)
AND ((tp_ContentType = ‘Document’) and tp_ListId=’C8723B19-0DAB-4F19-B195-3399D5375752′)