Home Analyst Portal

ChangeRequest.js

2»

Answers

  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    Finally was able to seal the MP. Verified template could be saved, but still no luck with the portal. Doing pageForm.viewModel it still doesn't show the property. 
  • damon_mulligandamon_mulligan Cireson Consultant Advanced IT Monkey ✭✭✭
    edited February 2018
    @Aaron_Smith
    SNK Tool Location:  C:\Program Files (x86)\Microsoft SDK's\Windows\v7.0A\Bin
    The version may be different.
    Good article about it here: https://marcelzehner.ch/2012/07/03/strong-name-key-files-for-sealing-your-mps-hmmmm/

    I think I an all caught up on the issue. I have a few questions.
    1. Did you save the class extension and the form extension in the same MP or separate management packs?
    2. They should be in 2 separate MP. Both should be sealed. However, when you set the bindings for the extended field, did you reference the sealed MP that had the class extension?
    3. Your label needs to be increased in size. (not a ?) 
    4. Did you import the unsealed .xml file before importing the sealed MP? If you did, you have to delete the .xml file first.
    The extension and import of a MP create by the authoring tool should not create many issues.

    The images are missing (will look into) but here is an article to loo at for extending fields, and good links at the bottom for a few other great posts.
    http://cireson.com/blog/adding-a-field-to-the-right-of-an-existing-field-scsm-2012-authoring-tool/
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    @damon_mulligan

    1. They're saved in the same sealed MP.
    2. I don't believe that to be true in terms of the class extension and custom form. Could you expand on the bindings you're talking about? Are you talking about the .js?
    3. Not sure what you're referencing here..
    4. Yes the unsealed .xml was removed prior. It had to be, because it won't allow you to import a sealed MP of the same name.

    Let me know if you have any other thoughts around this. 
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    Anyone have any other ideas how to expose the new property to Cireson. The new field functions fine in SCSM now that I was able to get the MP sealed. However, the Cireson Portal is still blind to the property. 
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Place the changerequest.js into your custom space.
    add the line for your new field
    like
    { DataType: "LongString", PropertyDisplayName: "Reason", PropertyName: "Reason", MinLength: 0, MaxLength: 4000}

    Update PropertyName with the name of your new field. 

    Recommend to use Entity explorer to determine the exact PropertyName that SCSM uses
    https://gallery.technet.microsoft.com/SCSM-Entity-Explorer-68b86bd2
  • damon_mulligandamon_mulligan Cireson Consultant Advanced IT Monkey ✭✭✭
    Brian hit it on the spot. Thanks for replying. @Aaron_Smith, if you have any issues with this, let us know here. This should be a fairly straight forward configuration.

    Reply to the MP items above. It is best practice to save your class extensions in one MP and the form extensions in another. If you ever want to completely blow away your form extension later, maybe to reformat or add many new fields, you can import over or delete the form extension without affecting your data being saved as a result of the class extension.
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    @Brian_Wiest That didn't fix it. However, I think I know what the issue is. Please see below:

    The class extension is different than the other properties. However, I'm not sure where to set that or if it can be modified. Thoughts?
  • damon_mulligandamon_mulligan Cireson Consultant Advanced IT Monkey ✭✭✭
    edited February 2018
    Copy the out of the box ChangeRequest.js file to the custom space folder and place this line where you want it.

    { DataType: "String", PropertyDisplayName: "Significant Change", PropertyName: "SignificantChange", Required: false, MinLength: 0, MaxLength: 256 };

    Side Note: When you create a MP with the Authoring Tool, give it a unique name.
    For your MP, Acme.ChangeRequests.Extension
    However as mentioned before, in the future have 2:
    Acme.ChangeRequest.ClassExtension
    Acme.ChangeRequest.FormExtension

  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Seeing your screenshot you need to update the data type as well
    Guessing this would be your final line
    { DataType: "String", PropertyDisplayName: "Significant Change", PropertyName: "SignificantChange", Disabled: false, ColSpan: 2, MinLength: 0, MaxLength: 256 },
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    @Brian_Wiest and @damon_mulligan none of this is working. All of these things I've tried prior. The Cireson Overlay still does not know about the new property. This functions fine within Service Manager, so the new property is add correctly. The question is why does Cireson not know about it. 
  • damon_mulligandamon_mulligan Cireson Consultant Advanced IT Monkey ✭✭✭
    Can you send a screenshot of where you placed the line of code. Or attach the changerequest.js file.
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    And do not forget to perform a force refresh. your browser may have cached the previous JS.
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    @Brian_Wiest

    Browser Cache isn't the issue. Still trying to figure this out. I may try and recreate the Management Pack again. 
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    @damon_mulligan see attached. It's the contents of the .js
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Where are you at with the error right now. Not seeing the field on the web page or contents will not save on submit?
  • damon_mulligandamon_mulligan Cireson Consultant Advanced IT Monkey ✭✭✭
    edited February 2018
    1. Did you make any other changes to this ChangeRequest.js file?
    2. What exact errors are you getting?
    3. Try removing 
    { DataType: "Spacer" }
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    @damon_mulligan

    1. I added the single line to make the new field visible.
    2. No errors, but the Cireson Portal doesn't know about the custom field. Everything is fine in SCSM
    3. That entry was already a part of the default template Cireson provided.
    I've noticed that when I save a CR template with the custom MP. That template disappears from the Cireson Portal. 
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    Still looking for any suggestions that might lead me in the right direction. I've tried everything that's been mentioned up to this point. Just a reminder that the extension works perfectly fine in SCSM. The issue is Cireson. 
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    With all the changes made to the MP recommend you clear out the health state folders on all of the management servers.
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    @Brian_Wiest I did this, but still no change. My test CR template that I have has now become unavailable to use inside the Cireson portal. 
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    Let me ask this. Does the customization need to be applied to all templates of the Change Request class for Cireson Portal to understand to show the new field?
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    @Justin_Workman Are you able to answer the question above?
  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    @Aaron_Smith - I was under the impression that the field was showing, the data just wasn't binding.  I could be wrong here, but I believe the management pack your templates are in has to have a reference to the class extension MP in order for the data to bind.  SCSM should create that reference automatically when you save a new template.  
  • Aaron_SmithAaron_Smith Customer IT Monkey ✭
    It binds correctly from within the SCSM console. However, attempting to save inside the Cireson portal does not work. That's the initial I've been battling with the customization. 
Sign In or Register to comment.