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.
Portal Asset Search
https://github.com/Cireson/Community_PortalAssetSearch.git
Hardware Asset Search
Instructions:
Copy the code in custom_HardwareAssetSearch.js , and place it anywhere in your customspace folder. Alternatively, copy the file and place it into your customspace directory, and then add the following line to your custom.js file:
For the Advanced Portal Searches, please go to https://community.cireson.com/discussion/3222/advanced-searches-for-cireson-service-manager-portal/
Comments
This search functionality will ~read CI objects from the ServiceManagement database. Can you take a look and see if you have duplicate hardware asset CIs within the ServiceManagement database, ConfigurationItem table? Something like the following query:
That was the issue, I had duplicate CI objects in the "ConfigurationItem" table of the ServiceManagement DB. I used this KB Article (https://support.cireson.com/KnowledgeBase/View/1142#/) to help me purge the data. I am only seeing one CI record in my search now and I am no longer getting the error accessing the Hardware Asset form.
Thanks for your help!
On the screenshot we also see a view 'My Hardware Assets'
But we don't have this in our environment. Was this released in a recent version?
Or is there another way to make this available.
Would it also be possible to set the MyAsset directly on the Navigation Node? So, only 1 click is needed to view the assets?
I found a way to move it to another node, but I would like it to open instantly.
To clarify, see the image below. I got it working when clicking the My Hardware Assets link, but I would like to open it when clicking on the My Assets next to the green arrow.
Is that possible?
Next, you can use the following code to redirect the newly-created nav node it to the currently logged-on user's asset page. Note: For best results with all browsers, it might work best with a timeout or observer, but this code will work a majority of the time.
For example, the display name could be AssetName (SerialNumber) [AssetTag]. This would allow you to use asset searching within the portal for any of the three fields.
---Original---
---New---
Aye, while there is no field within hardware assets to set the display name, whenever you edit a form and apply/OK the changes, the form itself will change the display name to be the same as the Asset Name. So an initial import wouldn't be reliable.
For more consistent results for changing your asset Display Names, I would suggest an Orchestrator Runbook with a short-timed schedule along with some PowerShell. Or if you prefer not to use Orchestrator, a Service Manager workflow on a schedule (c# or PowerShell) would also work.
I've made a couple changes that fixes the nav node from hiding, and fixes (well, seamlessly works around) the space bar not working in certain situations. Check out the attached copy and see if it works for you.
Jovian, would it be possible to apply your nav node fix to the following? It was bassed of your original script so suffers the same problem.
https://community.cireson.com/discussion/425/user-information-ci-search-page-for-analysts
I put the previous version of the script back into my CustomSpace folder and the errors in IE 10 go away and the search appears as it did before.
@Thomas_Stromberg @R_Delawder I hadn't actually tested with IE on 5.1+. Try this attached updated version which accounts for 5.1+ changes.
@Ian_Glenn IE10- doesn't support the MutationObserver object, so you get that error you provided. The attached updated version also contains a legacy file of hardware asset search, which uses a setTimeout method instead. Give that a shot.
the updated version fixed the display in IE and the space now works in chrome but space still doesn't work in IE. (which unfortunately is the required browser for our users as the chrome browser doesn't support cross domain calls that our custom task that call orchestrator use)