Home Analyst Portal

ChangeRequest.js

Aaron_SmithAaron_Smith Customer IT Monkey ✭
Does anyone have a .js for the ChangeRequest already built they would be willing to share? 
«1

Answers

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    edited January 2018
    @Aaron_Smith - What are you looking for in a custom Change Request form?  The original can be found at inetpub\CiresonPortal\scripts\forms\templates.  You can copy it from that location to inetpub\CiresonPortal\CustomSpace and it will be loaded in lieu of the original.  
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    @Justin_Workman - I didn't realize there was one provided. Maybe you can help with the next step. I've modified the change request form in SCSM. I added a new text field on the Planning Tab. I've modified the .js to show this field, but when I input something in and save. It doesn't save or map to the new field. 

    Thoughts?
  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    @Aaron_Smith - Did you extend the CR class?  Assuming you did, you'll want to use the Property name you defined in the extension exactly as it is in the Management Pack.  Here's the way I have a custom field defined in one of my forms:

    Here's the way it's defined in the Authoring Tool:

    Note: my screenshots are for the Incident Class, but the process is the same for the CR class
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    Yep. I did all of that exactly. See below:

    And added to the .js:


  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    And the form is rendering the addition in the portal, but not saving the property?
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    Correct. Field shows, but if I input anything and attempt to save it. It's blank when I come back to the ticket. 
  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    If you go into the F12/Dev tools and at the console prompt enter:
    pageForm.viewModel (case sensitive)
    and then expand the results, does your property show up there?
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    The property does not show. 
  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    Does your custom form work in the console?
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    It does: 
  • john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    Hi @Aaron_Smith

    I suspect I know what the issue is. Change Requests are always built from templates. Can you try opening each of the CR templates in the SCSM Console and then saving them? I am sure I have seen this problem before, and I think that it was resolved by simply loading and saving the templates forcing them to update the class definition.
  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    I think John is on the right track here, but as a test you could try to create a new template and generate a CR from the template in the portal.  The property should be present in the resulting CR.
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    Upon trying to save I received: 


    The version it references is not correct. Not sure why it's referencing version 1.0.0.0 instead of version 2.0.0.0
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    Any thoughts?
  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    Are you saving the template into a new MP or back into the MP where the extension is?  To avoid having to seal the management pack, you could save the template to the MP where the extension is.
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    Our templates are each saved in to their own MP. Our SR class is extended as well, and we follow the same structure with those as well. Both Unsealed. 
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    To be able to save content to a extended field you must seal the MP. The template can remain unsealed.
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    Attempting to seal right now, but trying to figure out how to create the .snk required for sealing. 
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    That's where I'm at, but trying to find a machine with the strong name key utility hasn't turned up anywhere. 
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    None of your machines have Visual Studio installed?
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    None that I use. Worked with a developer to get the key created. However, sealing the MP failed. 
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    So the Authoring Tool continues to fail when attempting to seal the MP. Found another utility, but it requires the Operations Manager console to be installed (for the powershell module). So i'm a bit stuck now. 
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    If anyone has some experience with this error. Please let me know:
  • john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    You can seal a Management Pack using PowerShell on a server with the SCSM Console. Launch the Console, and go to the Administrator page. On the right hand panel, you will find the task "Start PowerShell Session". Click that.

    Then input the command:
    Protect-SCManagementPack
    -ManagementPack (Get-SCSMManagementPack -ManagementPackFile
    "E:\Custom\Cireson.CustomStuff.xml") -KeyFilePath
    "E:\Custom\Cireson.snk" -CompanyName Cireson -OutputDirectory E:\
    obviously replacing the paths and filenames with appropriate values.
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    I get the following @john_doyle : Protect-SCManagementPack : ManagementPack sealing failed with error :error CS1548: Cryptographic failure while signing
    assembly 'd:\DEF.ChangeRequest.Custom.mp' -- 'Error signing assembly -- The parameter is incorrect. '
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    I believe it thinks my key file is corrupt. 
  • john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    @Aaron_Smith looks like an issue with your snk file. I would recommend downloading the Windows 10 SDK Windows 10 SDK and installing it on your desktop or laptop as this will provide you with the sn.exe tool you need to generate the required keys.
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    @john_doyle I installed the SDK kit, but still don't find the dev command prompt. Thoughts?

  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    @john_doyle Any Idea where the sn.exe tool lives after the SDK tool. I can't find it anywhere. 
Sign In or Register to comment.