Attaching file to user object in Service Manager 2012 R2

Hello,

I am trying to attach a document to a user object in Service Manager. I am able to do this on a computer object by going into related items then attached files.

But there isn't this option for users.

Any suggestions are welcome :)

Thanks.

January 26th, 2015 3:15pm

If there is a relationship between a user-object and an "attached file"-object then you would have to code the list yourself and add it to the user form (a steep learning curve to be able to do this). 

If there is no such relationship you will have to create it first. This is the easy part :D

There are tons of relationships for many of the commonly used classes that are not utilized. This is because they are inherited from a common baseclass. Ex. a manual activity does have an affected user, but it is not presented on the form.

Unfortunately the authoring tool does not play well with list controls. I have some example code on how to do this if you want? you will need some coding experience, preferable with C#.

Free Windows Admin Tool Kit Click here and download it now
January 26th, 2015 5:37pm

My guess is you have to code a solution for this which means you have to add a custom control to the user form in SCSM.
January 26th, 2015 5:38pm

Hi

You probaly would have to extend user form with a custom control which represents a list of attachments. High level steps could look like the following:

  1. Extend user form with a new tab "related items"
  2. Extend new typeprojection used by your form customization to include System.ConfigItemHasFileAttachment relationship
  3. Create custom control in Visual Studio which contains a ListView bound to the above mentioned relationship (component alias)
  4. Add this custom control to new tab on custom user form

See the following posts written by Anton and Rob for more information about custom controls and how to add them to a form:

http://blog.scsmsolutions.com/2011/08/create-custom-user-control-for-scsm-2010/
http://scsmnz.net/how-to-add-custom-mandatory-properties-to-scsm-forms/

Hope this helps!

Free Windows Admin Tool Kit Click here and download it now
January 26th, 2015 5:46pm

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

Other recent topics Other recent topics