Custom Form not showing Microsoft.Windows.Client.Computer

I have extended the class Microsoft.Windows.Client.Computer with some new relations and

properties.

I want to show these in a customForm

I have created a custom form

 

 

Imported MP in SCSM = Fine

 

I cannot get the new form to show up, always the default form shows.

I create a new view that points to my TypeProjections. I can see the relations there.

But no success with my new form

 

I tried with another class (Custom CI class) = it works .

 

I created a typeProjection :

 

 <TypeProjection ID="AMGWPIDeployedComputerForm_TypeProjection" Accessibility="Public" Type="AMGWPICLClientComputer!ClassExtension_d7af0630_6284_4caa_8583_52a497e866a6">

          <Component Path="$Context/Path[Relationship='ConfigMgr!Microsoft.SystemCenter.ConfigurationManager.DeployedComputerRunsWindowsComputer' SeedRole='Target']$" Alias="PhysicalComputer" />

          <Component Path="$Context/Path[Relationship='Windows!Microsoft.Windows.ComputerHostsOperatingSystem']$" Alias="OperatingSystem" />

          <Component Path="$Context/Path[Relationship='Windows!Microsoft.Windows.ComputerHostsLogicalDevice' TypeConstraint='Peripherals!Microsoft.Windows.Peripheral.NetworkAdapter']$" Alias="NetworkAdapter" />

          <Component Path="$Context/Path[Relationship='Windows!Microsoft.Windows.ComputerHostsLogicalDevice' TypeConstraint='Peripherals!Microsoft.Windows.Peripheral.Processor']$" Alias="Processor" />

          <Component Path="$Context/Path[Relationship='Windows!Microsoft.Windows.ComputerHostsLogicalDevice' TypeConstraint='Peripherals!Microsoft.Windows.Peripheral.PhysicalDisk']$" Alias="PhysicalDisk" />

          <Component Path="$Context/Path[Relationship='Windows!Microsoft.Windows.ComputerHostsLogicalDevice' TypeConstraint='Peripherals!Microsoft.Windows.Peripheral.LogicalDisk']$" Alias="LogicalDisk" />

          <Component Path="$Context/Path[Relationship='System!System.ComputerPrimaryUser']$" Alias="PrimaryUser" />

          <Component Path="$Context/Path[Relationship='System!System.ConfigItemServicedByUser']$" Alias="ServicedBy" />

          <Component Path="$Context/Path[Relationship='System!System.ConfigItemOwnedByUser']$" Alias="Custodian" />

          <Component Path="$Context/Path[Relationship='WorkItem!System.WorkItemRelatesToConfigItem' SeedRole='Target']$" Alias="ImpactedWorkItem" />

          <Component Path="$Context/Path[Relationship='WorkItem!System.WorkItemAboutConfigItem' SeedRole='Target']$" Alias="RelatedWorkItem" />

          <Component Path="$Context/Path[Relationship='SupportingItem!System.ConfigItemHasFileAttachment']$" Alias="FileAttachment" />

          <Component Path="$Context/Path[Relationship='System!System.ConfigItemRelatesToConfigItem']$" Alias="RelatedConfigItem" />

          <Component Path="$Context/Path[Relationship='System!System.ConfigItemRelatesToConfigItem' SeedRole='Target']$" Alias="RelatedConfigItemSource" />

          <Component Path="$Context/Path[Relationship='CoreKnowledge!System.EntityLinksToKnowledgeDocument']$" Alias="RelatedKnowledgeArticles" />

        </TypeProjection>

 

 

My forms part :

 

<Forms>

      <Form ID="AMGWPIClientForm" Accessibility="Public" Target="AMGWPIDeployedComputerForm_TypeProjection" Assembly="AMG.SCSM.WPI.Client" TypeName="AMG.SCSM.WPI.Client.AMGCIWPIClient">

        <Category>Form</Category>

      </Form>

    </Forms>

 

 

What am I doing wrong ?

February 24th, 2015 8:21am

I'm going to take a stab at this, but i'm not 100% on it. 

it looks like you've created a new form pointed at your extension class, but forms are never called by extension classes, only off the base class. 

moreover, each base class can have only one form, but that form can be extended. if you have extended the class, then i recommend you extend the form to match (obviously using your own extension properties, rather then the examples listed) . 

Free Windows Admin Tool Kit Click here and download it now
February 24th, 2015 3:41pm

Thanx for reply,

I tried the base class and I had the same result, but thanks for clarifying this for me. And it makes sence

I tried the base class before and had troubles with my projecting pointing to relations of my extended class

So i guessed to point the projectiontype to my extended class and it worked. So I need to check again with base class, just to be sure.

But anyhow I need  many to many relations  on my form and the  AM doesn't support a gridView for this. So Visual Studio is my way. I have created a whole new custom form.( I succeeded before but with a simple new CI created. And this worked perfect. But now I am extending windows.client class en extending deployed computer and want to show this in one form.) I am extending with new hosted classes (like audiocard,videocards,etc), with properties and references to other CI. So i wanted to create a new typeprojection and show some stuff on a custom form.

I want to use this form if someones opens the CI windows.client. 

I used the type projections from the configuration Manager MP as an example

Microsoft.Windows.Computer.ProjectionType

But had some errors and got stuck at the fact my form isn"t shown at all at the windows.computerclass.

So I stopped working on my typeprojection. First need to fix the form not showing up.

What I found so far on this forum (I tried the trick in  form Table and it works):

What you're trying to do is override the default Incident form. This, unfortunately, is not supported yet (not that I've heard, anyway).
There is an unsupported workaround, though. In your ServiceManager database in the Form table, change the "FormTarget" column for the incident form to a different target guid. I recommend choosing a guid from a row "higher" in that table. (When you do a select * from Form, pick a row that shows up before the incident form row..and replace the incident form's formtarget guid with that one. There's no guarantee that will work, so you may have to experiment with different guids, but you must pick a formtarget guid that exists..otherwise you might get some very unusual behavior from other forms.)

February 24th, 2015 6:16pm

But it is unsupported; but I can work on my projection again . and await a better sollution

Free Windows Admin Tool Kit Click here and download it now
February 24th, 2015 6:17pm

there is no supported method to replace a form. the recommendation for custom classes is to remove the MP containing original form and replace it with the new for definition. however, you are attempting to replace a default form, and removing default MPs is unsupported. 

You might take whatever code you're using and put it into a custom control, then use Rob ford's method to add custom controls via a form extension. Here's the relevant code block from his post. 

<Customization>
  <AddControl Parent="UpperGeneralGrid" Assembly="IncidentFormValidationControl" Type="IncidentFormValidationControl.ValidationControl" Left="49.5" Top="458" Right="0" Bottom="0" Row="0" Column="0" />
</Customization>


February 24th, 2015 6:57pm

OK.

But how to create a form different for client and server ?

There is a client class ; and there is a server class. But both opening with the default form .

If I extend the form the controls will show up for both

Free Windows Admin Tool Kit Click here and download it now
February 24th, 2015 7:41pm

I tried with extending the default form (computerform). It works fine adding the extended properties.

<but no success with adding the extended relations to my windows.client class. So I think I need to adjust the projection : I changed the type from windows computer to windows client computer , otherwise I cant add the extend relation from the client class. I added the relation and alias(bottom). But now I get an error whn opening form in console

 <TypeProjection ID="CustomForm_55b43bb3_3866_4f8a_85b0_35ca905d7523_TypeProjection" Accessibility="Public" Type="Alias_c1dc9be2_e6fb_43d4_b366_ff41ff9b46b4!Microsoft.Windows.Client.Computer">
          <Component Path="$Context/Path[Relationship='Alias_c7ae3ad7_b115_4171_83b3_686380537553!Microsoft.SystemCenter.ConfigurationManager.DeployedComputerRunsWindowsComputer' SeedRole='Target']$" Alias="PhysicalComputer" />
          <Component Path="$Context/Path[Relationship='Alias_c1dc9be2_e6fb_43d4_b366_ff41ff9b46b4!Microsoft.Windows.ComputerHostsOperatingSystem']$" Alias="OperatingSystem" />
          <Component Path="$Context/Path[Relationship='Alias_c1dc9be2_e6fb_43d4_b366_ff41ff9b46b4!Microsoft.Windows.ComputerHostsLogicalDevice' TypeConstraint='Alias_e49355a0_32cb_44be_b6ce_3424a080c5b5!Microsoft.Windows.Peripheral.NetworkAdapter']$" Alias="NetworkAdapter" />
          <Component Path="$Context/Path[Relationship='Alias_c1dc9be2_e6fb_43d4_b366_ff41ff9b46b4!Microsoft.Windows.ComputerHostsLogicalDevice' TypeConstraint='Alias_e49355a0_32cb_44be_b6ce_3424a080c5b5!Microsoft.Windows.Peripheral.Processor']$" Alias="Processor" />
          <Component Path="$Context/Path[Relationship='Alias_c1dc9be2_e6fb_43d4_b366_ff41ff9b46b4!Microsoft.Windows.ComputerHostsLogicalDevice' TypeConstraint='Alias_e49355a0_32cb_44be_b6ce_3424a080c5b5!Microsoft.Windows.Peripheral.PhysicalDisk']$" Alias="PhysicalDisk" />
          <Component Path="$Context/Path[Relationship='Alias_c1dc9be2_e6fb_43d4_b366_ff41ff9b46b4!Microsoft.Windows.ComputerHostsLogicalDevice' TypeConstraint='Alias_e49355a0_32cb_44be_b6ce_3424a080c5b5!Microsoft.Windows.Peripheral.LogicalDisk']$" Alias="LogicalDisk" />
          <Component Path="$Context/Path[Relationship='System!System.ComputerPrimaryUser']$" Alias="PrimaryUser" />
          <Component Path="$Context/Path[Relationship='System!System.ConfigItemOwnedByUser']$" Alias="Custodian" />
          <Component Path="$Context/Path[Relationship='Alias_b5696afe_e5f8_48ef_9613_96e5f38492ee!System.WorkItemRelatesToConfigItem' SeedRole='Target']$" Alias="ImpactedWorkItem" />
          <Component Path="$Context/Path[Relationship='Alias_b5696afe_e5f8_48ef_9613_96e5f38492ee!System.WorkItemAboutConfigItem' SeedRole='Target']$" Alias="RelatedWorkItem" />
          <Component Path="$Context/Path[Relationship='Alias_d8e8544f_b248_4e11_873e_7f9114475c09!System.ConfigItemHasFileAttachment']$" Alias="FileAttachment" />
          <Component Path="$Context/Path[Relationship='System!System.ConfigItemRelatesToConfigItem']$" Alias="RelatedConfigItem" />
          <Component Path="$Context/Path[Relationship='System!System.ConfigItemRelatesToConfigItem' SeedRole='Target']$" Alias="RelatedConfigItemSource" />
          <Component Path="$Context/Path[Relationship='Alias_03f555bc_5ad7_44a3_aae4_13debc3faea8!System.EntityLinksToKnowledgeDocument']$" Alias="RelatedKnowledgeArticles" />
  <Component Path="$Context/Path[Relationship='WindowsClientExt!AMGAdministrator']$" Alias="AMGAdministrator" />
        </TypeProjection>

February 24th, 2015 10:14pm

Funny thing is that the extended properties are showing in the extension TAB. So It should be possible to get the relations as a binding .

But I don't know howto.

Free Windows Admin Tool Kit Click here and download it now
February 25th, 2015 8:18am

With AM I created a custom Form with base class ... 

Microsoft.Windows.Client.Computer

I dragged a userpicker to it , bind it to my extended property .

And this works. If I open the CI Microsoft.Windows.Client.Computer it opens with my new form (not the default ComputerForm).

OK.

Now edit this form and add my custom form form Visual Studio (DLL) .

It works, though the databinding is not OK. So I work on the projection now. 

Post will continue

February 25th, 2015 10:22am

Got stuck again at the projection

The databindings are not working. I cant' seem to get the Microsoft.SystemCenter.ConfigurationManager.DeployedComputerRunsWindowsComputer class 

<TypeProjection ID="ClientFormT1_TypeProjection" Accessibility="Public" Type="Windows!Microsoft.Windows.Client.Computer">

 <Component Alias="PhysicalComputer" Path="$Context/Path[Relationship='ConfigurationManager!Microsoft.SystemCenter.ConfigurationManager.DeployedComputerRunsWindowsComputer' SeedRole='Target']$" /> 
 <Component Path="$Context/Path[Relationship='Windows!Microsoft.Windows.ComputerHostsOperatingSystem']$" Alias="OperatingSystem" />
          <Component Path="$Context/Path[Relationship='Windows!Microsoft.Windows.ComputerHostsLogicalDevice' TypeConstraint='Peripherals!Microsoft.Windows.Peripheral.NetworkAdapter']$" Alias="NetworkAdapter" />
          <Component Path="$Context/Path[Relationship='Windows!Microsoft.Windows.ComputerHostsLogicalDevice' TypeConstraint='Peripherals!Microsoft.Windows.Peripheral.Processor']$" Alias="Processor" />
          <Component Path="$Context/Path[Relationship='Windows!Microsoft.Windows.ComputerHostsLogicalDevice' TypeConstraint='Peripherals!Microsoft.Windows.Peripheral.PhysicalDisk']$" Alias="PhysicalDisk" />
          <Component Path="$Context/Path[Relationship='Windows!Microsoft.Windows.ComputerHostsLogicalDevice' TypeConstraint='Peripherals!Microsoft.Windows.Peripheral.LogicalDisk']$" Alias="LogicalDisk"  />
          <Component Path="$Context/Path[Relationship='Alias_a07f9867_2ae8_4e1e_9513_4c5c7eb8fef7!AMGAdministrator']$" Alias="AMGAdministrator" />
          <Component Path="$Context/Path[Relationship='Alias_a07f9867_2ae8_4e1e_9513_4c5c7eb8fef7!AMGAdministratorBackUp']$" Alias="AMGAdministratorBackUp" />




</TypeProjection>

Free Windows Admin Tool Kit Click here and download it now
February 25th, 2015 2:27pm

Ik used [0]

February 25th, 2015 8:32pm

it worked
Free Windows Admin Tool Kit Click here and download it now
February 25th, 2015 8:33pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics