(https://blog.scsmsolutions.com/xmlrpc.php) How to rename item from sealed MP in SCSM – SCSM: all for administration and development (SCSM: all for administration and development » Feed) (https://blog.scsmsolutions.com/feed/) (SCSM: all for administration and development » Comments Feed) (https://blog.scsmsolutions.com/comments/feed/) (SCSM: all for administration and development » How to rename item from sealed MP in SCSM Comments Feed) (https://blog.scsmsolutions.com/2011/09/howto-rename-object-in-scsm/feed/) (../../../wp-content/plugins/contact-form-7/includes/css/styles.css@ver=4.3.1.css) (../../../wp-content/plugins/table-of-contents-plus/screen.min.css@ver=1509.css) (../../../wp-content/plugins/wp-polls/polls-css.css@ver=2.72.css) (../../../wp-content/plugins/wp-to-twitter/css/twitter-feed.css@ver=4.4.33.css) (../../../wp-content/themes/inkblot/style.css@ver=4.4.33.css) (../../../wp-content/plugins/jetpack/css/jetpack.css@ver=3.9.9.css) (../../../wp-content/plugins/share-buttons/css/share-buttons-user.css) (../../../../stg.odnoklassniki.ru/share/odkl_share.css) (https://blog.scsmsolutions.com/wp-json/) (RSD) (https://blog.scsmsolutions.com/xmlrpc.php?rsd) (https://blog.scsmsolutions.com/wp-includes/wlwmanifest.xml) (Different between “Create Date” and “Time Added” fields) (https://blog.scsmsolutions.com/2011/09/different-between-timeadded-and-createddate/) (Code snippets for SCSM 2010 SP1 SDK. Part 1.) (https://blog.scsmsolutions.com/2011/09/codesnipets-for-scsm-2010-sdk/) (index.html) (https://wp.me/p1NgiE-M) (https://blog.scsmsolutions.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fblog.scsmsolutions.com%2F2011%2F09%2Fhowto-rename-object-in-scsm%2F) (https://blog.scsmsolutions.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fblog.scsmsolutions.com%2F2011%2F09%2Fhowto-rename-object-in-scsm%2F&format=xml) (https://jetpack.wordpress.com/) (https://s0.wp.com/) (https://s1.wp.com/) (https://s2.wp.com/) (https://public-api.wordpress.com/) (https://0.gravatar.com/) (https://1.gravatar.com/) (https://2.gravatar.com/) (https://widgets.wp.com/) (index.html#content) Skip to content (https://blog.scsmsolutions.com) SCSM: all for administration and development (SCSM: all for administration and development) (https://blog.scsmsolutions.com/) Home (https://blog.scsmsolutions.com/feedback/) Feedback (https://blog.scsmsolutions.com/) Home(https://blog.scsmsolutions.com/feedback/) Feedback How to rename item from sealed MP in SCSM (index.html) How to rename item from sealed MP in SCSM published on September 5, 2011 (https://blog.scsmsolutions.com/author/freemanru/) Read more posts by the author of How to rename item from sealed MP in SCSM, Anton Gritsenko (index.html#comments) 3 Commentson How to rename item from sealed MP in SCSM (image) (image) Some time you need to rename items in sealed management pack. For unsealed it’s can be done easily: export, change the value and import again, instead of sealed MPs, which we can’t change and reimport to SCSM. But management pack engine is pretty well then we talk about localization. Let’s see how to implement this. Before, lets list that exactly we can change using this approach: Display Name for any component – class, property, type projection and so on. Display Name for folders and view String inside forms As you can see this’s almost all items from SCSM. Localization in SCSM Firstly, some piece of theory. All components from SCSM’s management pack has the ID attribute – string identification. For example, ID of instance class – System.WorkItem.Incident . Also each management pack has LanguagePacks section. That section store the localized string for all component inside management pack. See code snippet below for example of LanguagePacks section for Incident class: Incident Defines the basic properties of incidents Инцидент Определение основных свойств инцидентов EachLanguagePack section has ID attribute. This attribute must contains three-letter code define in (http://www.w3.org/WAI/ER/IG/ert/iso639.htm) ISO 639 . Each LanguagePack section contains list of DisplayString elements. The ElementID attribute is a link to existing element’s ID, the SubElementID attribute is a link to some additional subcomponent, if exist (class property, type projection component and so on). As example, let’s se at DisplayString element for the Source property of the Incident class: Источник Источник Then we talk about forms it’s little bit complicated. For standard item like classes, properties, relationships and so on used same string as appropriated item. As result, if we change dispay name for this item it’s also will change in a form. But many strings are not part of some item, and they stored separately. Then the form are defined inside management pack it can (as usual do) contains FormStrings section:
Form $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.Incident.Forms.IncidentFormControl.Label_hours"]$ $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.Incident.Forms.IncidentFormControl.Label_minutes"]$ The value of the FormString element is a link to StringResource section inside current (or another sealed) management pack. There is also a DisplayString for each StringResource inside appropriated LanguagePacks : hours hours часы часы More information about this you can read (http://blogs.technet.com/b/servicemanager/archive/2010/02/25/localizing-forms-service-request-example.aspx) here . Then we import the management pack with DisplayString inside to SCSM all DisplayString saved to LocalizedText table of the main SCSM database. SDK service use that table then someone request the localized string for item. The SDK service used for all types of connection to SCSM: console, PowerShell, SDK. Change item’s display name Now we are ready to rename any item. To do that we must create new unsealed management pack and add reference to the management pack contained the item’s definition. After that we can use link to necessary element at  the ElementID attribute as: “alias!id” , where: alias – alias name from the References section of the current management id – element ID from sealed management pack For example, to get a link to the System.WorkItem.Incident class we must add reference to the System.WorkItem.Incident.Library management pack cause this MP contains definition of the Incident class: System.WorkItem.Incident.Library 7.0.6555.0 31bf3856ad364e35 Now we can use that alias to create link: ”CoreIncident !System.WorkItem.Incident” After that you must create new DisplayString section and insert that link as ElementID attribute’s value. Inside created section you must set element to string that you want to display at SCSM. And after all then you import your MP to SCSM your display string will change. This approach has one disadvantage – you can revert changed value until you change it un your MP. Another word, deletion of your customized MP don’t restore original values cause LocalizedText updated only then MP was imported. Another note. Direct changes in the LocalizedText table are NOT SUPPORTED ! Some examples First of all, you must read (http://blogs.technet.com/b/servicemanager/archive/2009/05/20/hacking-mp-xml-like-a-pro.aspx) this article which give you some useful information about how to search elements inside management packs. The most simple way to search item is a use the like operator. Note that each string surrounded by tag. First example is a “most wanted“ feature for SCSM: rename the urgency and\or impact enum values. Let’s find “Medium” string inside all management pack with next query: SELECT [MPIsSealed] ,[MPName] ,[MPFriendlyName] ,convert(xml, [MPXML]) FROM [dbo].[ManagementPack] where MPXML like '%Medium%' Note to the convert function – this avoid us to export each management pack from SCSM. We can read management pack as XML text directly from SQL Server Management Studio (click field to open new window). As result of prevision query you must get something like that: (image) (image) As we already know we must search only sealed MPs and only one MP meet to this criteria: System.WorkItem.Library . Click to it and find text: (image) (image) Look at ElementID and save it – this is ID we are looking for. Stay current windows opened, little bit later we will return to it. At the next step we need to create the new empty management pack. Simplest way – use the Authoring Tool. Then we must add reference to management pack early found. To do that just copy-paste any existing Reference element and change ID attribute to System.WorkItem.Library (just copy it from SQL Server Management Studio, you can find ID at the beginning of MP). The Version element set to same or less as System.WorkItem.Library. T he PublicKeyToken elemnt set to 31bf3856ad364e35 (this value must be set for all management pack from MSFT). The Alias attribute can be any. Look at this screenshot to better understand which value you must copy (right side is a sealed MP opened in SQL Server Management Studio): (image) (image) After that we must add new DisplayString section inside LanguagePack section. The ElementID attribute value must be set to element ID from unsealed management with link to this MP (WorkItem!): 2 - Medium After that you can import management pack to SCSM and check the result: (image) (image) Next example show how to change string on form. By default, all comments added to incident marked as Public. But that if you want to change default value to Private? Generally, by default this checkbox has no affect until you not created workflow to send email to the enduser. but then you create this workflow you can use this value as you wish: send then it’s True or then it’s False. So, we just rename the label on form and all done: (image) (image) Let’s start. Change criteria to private. Ru n the query. The query return two MPs – System.WorkItem.Library and ServiceManager.IncidentManagement.Library . First contains display string for the class property, second for the checkbox. Will be good if we change both. Add to the References section reference to both MPs (note: if you use same MP as for first example then the WorkItem Mp already been added) Add to the LanguagePack section the DisplayString elements As result you must write something like that: Save as public Public (changed!) Pubic Public (changed!) Result: (image) (image) Conclusion Don’t be scared – that process look like something complicated but after several attempt you figure out that this is easy. Some useful information: Use your lab before implement any changes in the production. Take care about reference with same alias and\or MP ID – that raise error then import to SCSM Don’t forget add LINK! before element ID Some time you must restart console to see the changes Sample management pack you can download (http://scsmsolutions.com/examples/SCSMSolutions.RenameEnums.xml) here (right click and Save As…). Share (Share to Facebook) (index.html#facebook) (Share to Facebook) (Share to Google Buzz) (http://www.google.com/buzz/post) (https://blog.scsmsolutions.com/2011/09/howto-rename-object-in-scsm/) (Share to Twitter) (http://twitter.com/share) Tweet Like this: Like Loading... Categories (https://blog.scsmsolutions.com/category/faq/) FAQ Tags (https://blog.scsmsolutions.com/tag/faq/) FAQ , (https://blog.scsmsolutions.com/tag/helpers-2/) helpers , (https://blog.scsmsolutions.com/tag/localization/) localization , (https://blog.scsmsolutions.com/tag/xml/) XML Post navigation (https://blog.scsmsolutions.com/2011/09/different-between-timeadded-and-createddate/) Previous post: Different between “Create Date” and “Time Added” fields (https://blog.scsmsolutions.com/2011/09/codesnipets-for-scsm-2010-sdk/) Next post: Code snippets for SCSM 2010 SP1 SDK. Part 1. 3 Comments (http://scsm.us/?p=13206) SCSM.US » SCSM User Group Slide Deck for Sept [Now Available] (index.html#comment-7) Comment by SCSM.US » SCSM User Group Slide Deck for Sept [Now Available] published on September 23, 2011 @ 1:48 am (https://blog.scsmsolutions.com/2011/09/howto-rename-object-in-scsm/?replytocom=7#respond) Reply […] Another gem from the meeting today: How to rename item from sealed MP in SCSM ((http://blog.scsmsolutions.com/2011/09/howto-rename-object-in-scsm/) http://blog.scsmsolutions.com/2011/09/howto-rename-object-in-scsm/ ) […] () SCSM DEV(index.html#comment-252) Comment by SCSM DEV published on June 11, 2013 @ 1:37 pm (https://blog.scsmsolutions.com/2011/09/howto-rename-object-in-scsm/?replytocom=252#respond) Reply Thank you for this great post. In my case i would like to change the value of the private checkbox to True. So it would always appear as ticked by default. does your solution apply only to labels ? would it work on others items such changin the value of the checkbox ? thanks () smuser12(index.html#comment-296) Comment by smuser12 published on September 18, 2013 @ 8:41 pm (https://blog.scsmsolutions.com/2011/09/howto-rename-object-in-scsm/?replytocom=296#respond) Reply Great Article. Thank u Leave a Reply (index.html#respond) Cancel reply () Primary Sidebar Search Search Current Poll (d26b29fd79) (2) Are you using the Knowledge Base in SCSM 2012? (6) Yes, with console and portal (7) Yes, but with console only (8) Yes, but with portal only (9) No (Vote) (index.html#ViewPollResults) (View Results Of This Poll) View Results (Loading ...) (Loading ...) Loading ... Tags (https://blog.scsmsolutions.com/tag/active-directory/) (1 topic) Active Directory (https://blog.scsmsolutions.com/tag/advanced-view-editor/) (6 topics) Advanced View Editor (https://blog.scsmsolutions.com/tag/authoring/) (4 topics) authoring (https://blog.scsmsolutions.com/tag/ave/) (4 topics) AVE (https://blog.scsmsolutions.com/tag/ave-pro/) (6 topics) AVE Pro (https://blog.scsmsolutions.com/tag/book/) (1 topic) book (https://blog.scsmsolutions.com/tag/c/) (3 topics) C# (https://blog.scsmsolutions.com/tag/delegation/) (1 topic) delegation (https://blog.scsmsolutions.com/tag/development-2/) (4 topics) development (https://blog.scsmsolutions.com/tag/enumeration/) (1 topic) Enumeration (https://blog.scsmsolutions.com/tag/faq/) (4 topics) FAQ (https://blog.scsmsolutions.com/tag/forms/) (2 topics) forms (https://blog.scsmsolutions.com/tag/helpers-2/) (2 topics) helpers (https://blog.scsmsolutions.com/tag/idataitem-interface/) (1 topic) IDataItem interface (https://blog.scsmsolutions.com/tag/images/) (2 topics) images (https://blog.scsmsolutions.com/tag/kerberos/) (1 topic) Kerberos (https://blog.scsmsolutions.com/tag/localization/) (1 topic) localization (https://blog.scsmsolutions.com/tag/news/) (3 topics) News (https://blog.scsmsolutions.com/tag/notification/) (1 topic) Notification (https://blog.scsmsolutions.com/tag/office365/) (1 topic) Office365 (https://blog.scsmsolutions.com/tag/optimistic-concurrency-control/) (1 topic) Optimistic Concurrency control (https://blog.scsmsolutions.com/tag/portal/) (3 topics) Portal (https://blog.scsmsolutions.com/tag/powershell/) (13 topics) Powershell (https://blog.scsmsolutions.com/tag/scsm/) (7 topics) SCSM (https://blog.scsmsolutions.com/tag/scsm-2010/) (2 topics) SCSM 2010 (https://blog.scsmsolutions.com/tag/scsm-2012/) (15 topics) SCSM 2012 (https://blog.scsmsolutions.com/tag/scsm-2012-r2/) (5 topics) SCSM 2012 R2 (https://blog.scsmsolutions.com/tag/scsm-2016/) (1 topic) SCSM 2016 (https://blog.scsmsolutions.com/tag/scsmforms/) (1 topic) SCSM;Forms (https://blog.scsmsolutions.com/tag/sdk/) (2 topics) SDK (https://blog.scsmsolutions.com/tag/sharepoint/) (2 topics) Sharepoint (https://blog.scsmsolutions.com/tag/sla/) (5 topics) SLA (https://blog.scsmsolutions.com/tag/smlets/) (6 topics) SMLets (https://blog.scsmsolutions.com/tag/smtp/) (1 topic) SMTP (https://blog.scsmsolutions.com/tag/spn/) (1 topic) SPN (https://blog.scsmsolutions.com/tag/token/) (1 topic) token (https://blog.scsmsolutions.com/tag/tools/) (1 topic) tools (https://blog.scsmsolutions.com/tag/troubleshooting/) (10 topics) Troubleshooting (https://blog.scsmsolutions.com/tag/unleashed/) (1 topic) Unleashed (https://blog.scsmsolutions.com/tag/ur/) (5 topics) UR (https://blog.scsmsolutions.com/tag/usercontrol/) (1 topic) UserControl (https://blog.scsmsolutions.com/tag/views/) (1 topic) Views (https://blog.scsmsolutions.com/tag/web-portal/) (2 topics) web-portal (https://blog.scsmsolutions.com/tag/workflow/) (2 topics) workflow (https://blog.scsmsolutions.com/tag/xml/) (1 topic) XML Recent Posts (https://blog.scsmsolutions.com/2024/02/error-system-typeloadexception-could-not-load-type-microsoft-enterprisemanagement-common-deleteworkflowcomputernotallowedexception-after-upgrading-to-scsm-2022/) Error “System.TypeLoadException: Could not load type ‘Microsoft.EnterpriseManagement.Common.DeleteWorkflowComputerNotAllowedException’ ” after upgrading to SCSM 2022 (https://blog.scsmsolutions.com/2020/02/scsm-2019-ur1-release/) SCSM 2019 UR1 Release (https://blog.scsmsolutions.com/2020/01/how-to-manage-custom-user-role-profile-in-scsm/) How to manage custom user role profile in SCSM (https://blog.scsmsolutions.com/2019/12/new-version-of-the-smlets-released/) New version of the SMLets released (https://blog.scsmsolutions.com/2017/07/issue-with-preview-and-customization-form-in-the-scsm/) Issue with preview and customization form in the SCSM Archives (https://blog.scsmsolutions.com/2024/02/) February 2024 (1) (https://blog.scsmsolutions.com/2020/02/) February 2020 (1) (https://blog.scsmsolutions.com/2020/01/) January 2020 (1) (https://blog.scsmsolutions.com/2019/12/) December 2019 (1) (https://blog.scsmsolutions.com/2017/07/) July 2017 (1) (https://blog.scsmsolutions.com/2016/03/) March 2016 (1) (https://blog.scsmsolutions.com/2016/01/) January 2016 (1) (https://blog.scsmsolutions.com/2015/07/) July 2015 (1) (https://blog.scsmsolutions.com/2015/05/) May 2015 (2) (https://blog.scsmsolutions.com/2014/10/) October 2014 (1) (https://blog.scsmsolutions.com/2014/07/) July 2014 (1) (https://blog.scsmsolutions.com/2014/05/) May 2014 (3) (https://blog.scsmsolutions.com/2014/03/) March 2014 (1) (https://blog.scsmsolutions.com/2014/02/) February 2014 (1) (https://blog.scsmsolutions.com/2013/12/) December 2013 (2) (https://blog.scsmsolutions.com/2013/10/) October 2013 (2) (https://blog.scsmsolutions.com/2013/07/) July 2013 (6) (https://blog.scsmsolutions.com/2013/06/) June 2013 (1) (https://blog.scsmsolutions.com/2013/04/) April 2013 (1) (https://blog.scsmsolutions.com/2013/03/) March 2013 (3) (https://blog.scsmsolutions.com/2013/02/) February 2013 (2) (https://blog.scsmsolutions.com/2013/01/) January 2013 (2) (https://blog.scsmsolutions.com/2012/11/) November 2012 (1) (https://blog.scsmsolutions.com/2012/09/) September 2012 (3) (https://blog.scsmsolutions.com/2012/08/) August 2012 (4) (https://blog.scsmsolutions.com/2012/07/) July 2012 (1) (https://blog.scsmsolutions.com/2012/06/) June 2012 (1) (https://blog.scsmsolutions.com/2012/05/) May 2012 (3) (https://blog.scsmsolutions.com/2012/04/) April 2012 (4) (https://blog.scsmsolutions.com/2012/03/) March 2012 (1) (https://blog.scsmsolutions.com/2012/02/) February 2012 (5) (https://blog.scsmsolutions.com/2011/11/) November 2011 (1) (https://blog.scsmsolutions.com/2011/09/) September 2011 (3) (https://blog.scsmsolutions.com/2011/08/) August 2011 (4) (index.html#document) © 2011–2024 SCSM: all for administration and development • Powered by (https://wordpress.org/) WordPress with (https://github.com/mgsisk/inkblot) Inkblot (../../../wp-content/plugins/share-buttons/css/share-buttons-user.css) (../../../../stg.odnoklassniki.ru/share/odkl_share.css) (../../../wp-content/plugins/share-buttons/css/share-buttons-user.css) (../../../../stg.odnoklassniki.ru/share/odkl_share.css) (../../../wp-content/plugins/subscribe-to-comments-reloaded/includes/css/stcr-plugin-style.css@ver=4.4.33.css) %d bloggers like this: