IT Monkey will place code here as examples of what Cireson's consulting team has to offer as well as examples for public consumption to benefit the Microsoft System Center community as a whole.
DISCLAIMER
All files and projects located here come as is and without any warranty or support. We will attempt to improve the projects as time goes on based on customer and community demand. Comments and improvements are welcome as well as customization requests. Your use of these Cireson Uploads is subject to our Terms of Use.
Cireson's support team has no information on these projects outside of what you have available and will not provide support for these enhancements, extensions, and scripts.
Dont forget to checkout solutions uploaded by our customers, partners and community members here.
Create Config Items in Cireson Portal
Ever wanted to be able to create Config Items via the Cireson Portal?
Check out this community solution:
Install
Copy Files to CustomSpace as per your structure. Suggested structure is
- CustomSpace
- CustomCode
- CustomCI
- CustomCI.js
- CustomCI
- CustomCode
Copy the script loader line into custom.js
If you are not sure how to use script loader, check out this blog
Use
Update the ciClasses array on line 10 to contain all the classed you want to create. For each CI type you want to be able to create, you need to add:
- Display Name (this doesn't have to match the actual class definition)
- ClassId (retrieve this via PowerShell)
- Icon (any Font Awesome icon up to version 4.2. Full list here)
The functionality will be available to Analysts. If you need this changed, update line 6.
Then you can create CIs from the NEW drawer.
Please Note
Due to a limitation of the Cireson Portal, the Create CI works differently to Creating any other type of object. Upon clicking the type you want to create, an empty object is created AND committed to the database. The Portal will then redirect you to edit that object. If you navigate away from this page, the empty object will still exist.
Contributors
All contribution welcome.
Comments
@Jan_Schulz I believe you were looking for something like this?
@Steve_Wright I believe you were looking for something like this?
@Geoff_Ross
This is exactly what we were looking for.
I will fire it up in my lab and test creating our custom CIs.
Thank you for this
@Geoff_Ross thank you for that.
I tested it with two of our classes and both get an error.
In both classes we have a key property which is required and don´t autoincrement.
If i understand it right only configItem classes with autoincrement key property can be used for this solution. Is it right?
@Jan_Schulz Yes, you are right, that scenario would not be supported right now.
Its difficult as we have to commit before loading the form, but in this case we need to provide the value for the key property before commit. Let me have a think... 🤔
Did you ever get anywhere with the issues outlined above @Geoff_Ross? I was hoping to use it for some custom classes I created for a customer but it seems to error out much like the above
Hi @Alex_Marsh
Still on my long long to do list. What is the key property of your custom class? If you are able to switch this out for an autoincremented property with a default value, the above will work. This is how I build my custom CI classes to allow for renaming things (as customers always want to). Let me know if you need hand.
Geoff
One of the classes is the SCCM mobile class which I've just added a couple of extra values to so no dice there it would seem.
I sussed out the issue with my custom class, didn't have a default value set for the autoincrement so it loads, however this appears in the console on submit and locks up the portal
but does seem to save it which is confusing