<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://greggsmith.net/wiki/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages</id>
		<title>SDU - New pages [en]</title>
		<link rel="self" type="application/atom+xml" href="http://greggsmith.net/wiki/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages"/>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Special:NewPages"/>
		<updated>2026-07-27T11:39:53Z</updated>
		<subtitle>From SDU</subtitle>
		<generator>MediaWiki 1.26.1</generator>

	<entry>
		<id>http://greggsmith.net/wiki/index.php?title=Attachments_on_Configuration_Items_r12</id>
		<title>Attachments on Configuration Items r12</title>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Attachments_on_Configuration_Items_r12"/>
				<updated>2012-12-06T12:38:11Z</updated>
		
		<summary type="html">&lt;p&gt;Mitcr01: /* The Attachment Tab form */ - fix.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
[[Category:Configuration Items]]&lt;br /&gt;
[[Category:Customizations]]&lt;br /&gt;
[[Category:r12]]&lt;br /&gt;
{{Global Header}}&lt;br /&gt;
{{Global Announcement}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This article provides instructions for adding attachment capabilities to Configuration Items in CA Service Desk Manager.&lt;br /&gt;
&lt;br /&gt;
''Note: This customization is designed for r12.5 and above versions, providing an implementation of the previous [[Attachments_on_Configuration_Items|Attachments on Configuration Items]] customization. The previous customization is targeted for r11.x and r12.0/r12.1 CA SDM version.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Procedures =&lt;br /&gt;
== SDM Schema customizations ==&lt;br /&gt;
Use the Web Screen Painter to add a new Table in the Schema Designer. The new table should be called '''zlrel_attachment_nrs''' and should have 2 fields:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Field name&lt;br /&gt;
! style=&amp;quot;width:200px;&amp;quot; | Type of Field&lt;br /&gt;
|-&lt;br /&gt;
| nr&lt;br /&gt;
| SREL to 'nr', required&lt;br /&gt;
|-&lt;br /&gt;
| attmnt&lt;br /&gt;
| SREL to 'attmnt', required&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Set the Function Group of this new table to &amp;quot;Configuration Item&amp;quot;. Save the Schema changes in the Schema Designer and then choose 'File-&amp;gt;Save and Publish' from the menu.&lt;br /&gt;
&lt;br /&gt;
In order for the Schema changes to be applied, stop the '''CA Service Desk Manager''' service on the primary server and then execute 'pdm_publish' from a command prompt.&lt;br /&gt;
&lt;br /&gt;
Before starting the '''CA Service Desk Manager''' service, create a new MAJ file in the ''$NX_ROOT/site/mods/majic'' folder, called '''z_nr_cis.maj'''. This file should contain the following lines:&lt;br /&gt;
&amp;lt;source lang=text&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// Factory:   attmnt&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
OBJECT attmnt {&lt;br /&gt;
  ATTRIBUTES Attachment {&lt;br /&gt;
    nrs BREL zlrel_attachment_nrs attmnt { LREL nr; } ;    &lt;br /&gt;
  };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// Factory:   nr&lt;br /&gt;
////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
OBJECT nr {&lt;br /&gt;
  ATTRIBUTES usp_owned_resource SECONDARY {&lt;br /&gt;
    attachments BREL zlrel_attachment_nrs nr { LREL attmnt; } ;&lt;br /&gt;
  };&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure the file has the .maj extension, otherwise it will not be processed by SDM.&lt;br /&gt;
&lt;br /&gt;
Finally, start the '''CA Service Desk Manager''' service back on and make sure that there are no errors reported in the stdlogs.&lt;br /&gt;
&lt;br /&gt;
==Interface customizations ==&lt;br /&gt;
=== Configuration Item detail form ===&lt;br /&gt;
Customize the '''cmdbNotebook.htmpl''' form to add a new Tab to the Configuration Item detail form. The form contains the definition of all the Tabs that appear on the Configuration Item detail form, you can just insert the new Tab definition where desired, using the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt; &amp;lt;PDM_MACRO NAME=TAB  title=&amp;quot;Files&amp;quot; ID=Attachments SRC=&amp;quot;OP=SHOW_DETAIL+HTMPL=xx_attmnt_tab.htmpl+FACTORY=nr+PERSID=$args.persistent_id+NO_DP=yes&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Attachments list form ===&lt;br /&gt;
Customize the '''list_attmnt_sd.htmpl''' form by adding lines in 2 places.&lt;br /&gt;
'''First''', after the line &amp;lt;source lang=&amp;quot;Javascript&amp;quot;&amp;gt;document.write('&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;QBE.EQ.issues.iss.persistent_id&amp;quot; value=&amp;quot;$args.QBE.EQ.issues.iss.persistent_id&amp;quot;&amp;gt;');&amp;lt;/source&amp;gt;&lt;br /&gt;
the following code should be added&lt;br /&gt;
&amp;lt;source lang=&amp;quot;Javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Custom - enable the display of Attachments in a Tab on the Configuration Item detail form&lt;br /&gt;
document.write('&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;QBE.EQ.nrs.nr.id&amp;quot; value=&amp;quot;$args.QBE.EQ.nr_list.nr.id&amp;quot;&amp;gt;');&lt;br /&gt;
// END Custom&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Second''', after the line&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
case &amp;quot;chg&amp;quot;: attmntAccess = &amp;quot;${ACCESS.FAC_chg:0}&amp;quot; - 0; break;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
the following code should be added&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Custom - enable the display of Attachments in a Tab on the Configuration Item detail form&lt;br /&gt;
case &amp;quot;nr&amp;quot;: attmntAccess = &amp;quot;${ACCESS.FAC_nr:0}&amp;quot; - 0; break;&lt;br /&gt;
// END Custom&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The Attachment Tab form ===&lt;br /&gt;
Customize the '''xx_attmnt_tab.htmpl''' file.&lt;br /&gt;
&lt;br /&gt;
1. Search for the following code fragment:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var attmntAccess = 0;&lt;br /&gt;
switch (&amp;quot;$prop.factory&amp;quot;) {&lt;br /&gt;
   case &amp;quot;cr&amp;quot;:  attmntAccess = &amp;quot;${ACCESS.FAC_cr:0}&amp;quot; - 0; break;&lt;br /&gt;
   case &amp;quot;iss&amp;quot;: attmntAccess = &amp;quot;${ACCESS.FAC_iss:0}&amp;quot; - 0; break;&lt;br /&gt;
   case &amp;quot;chg&amp;quot;: attmntAccess = &amp;quot;${ACCESS.FAC_chg:0}&amp;quot; - 0; break;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and replace it with &lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var attmntAccess = 0;&lt;br /&gt;
switch (&amp;quot;$prop.factory&amp;quot;) {&lt;br /&gt;
   case &amp;quot;cr&amp;quot;:  attmntAccess = &amp;quot;${ACCESS.FAC_cr:0}&amp;quot; - 0; break;&lt;br /&gt;
   case &amp;quot;iss&amp;quot;: attmntAccess = &amp;quot;${ACCESS.FAC_iss:0}&amp;quot; - 0; break;&lt;br /&gt;
   case &amp;quot;chg&amp;quot;: attmntAccess = &amp;quot;${ACCESS.FAC_chg:0}&amp;quot; - 0; break;&lt;br /&gt;
   // Custom - enable the Attachments tab on the Configuration Item detail form&lt;br /&gt;
   case &amp;quot;nr&amp;quot;: attmntAccess = &amp;quot;${ACCESS.FAC_nr:0}&amp;quot; - 0; break;&lt;br /&gt;
  // End Custom&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Towards the end of the file, after&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PDM_ELIF &amp;quot;$prop.factory&amp;quot; == &amp;quot;iss&amp;quot;&amp;gt;&lt;br /&gt;
      att_tab_url += &amp;quot;+QBE.EQ.issues.iss.persistent_id=$args.persistent_id&amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
add the following code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot; &amp;gt;  &lt;br /&gt;
&amp;lt;PDM_ELIF &amp;quot;$prop.factory&amp;quot; == &amp;quot;nr&amp;quot;&amp;gt;&lt;br /&gt;
      att_tab_url += &amp;quot;+QBE.EQ.nrs.nr.id=$args.id&amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clear the SDM web cache ===&lt;br /&gt;
Clear the SDM Webengine web cache by executing 'pdm_webcache' in a command prompt on the SD primary server. This will incorporate the interface customizations done in the previous steps and show them in the SDM web client.&lt;/div&gt;</summary>
		<author><name>Mitcr01</name></author>	</entry>

	</feed>