Custom MPs with extended class showing in all Incident templates, under Extensions?
Hi Guys,
We have created some MPs A and B that we wanted to have some extra classes for our incidents, and have imported into our SCSM 2019 Server fine.
Example: A has Books, B has Sea.
We've created some templates our of these MPs but for some reason, all incident templates are showing all these extra fields under extension tab.
Is there a way for Example Template Printer, based on A only shows Books in Extension tab, and Template World, based on B only shows Sea?
What we're seeing
What we want
Many thanks in advance.
Answers
When you extend a class, it'll propagate that extension to all objects of that class.
Instead, you could inherit from the Incident class, effectively making your own class. And only objects based on that class, will have the specific change. So you can create templates for each, and it'll only show that change. BUT - this is not advisable, as it will add a lot of unnecessary complexity. For example, what if an incident is mistakenly created with Template Printer, so it shows Sea, but it was actually meant to be Template World? You would have no way to change the class, so you would need to close the Printer incident, and then create a new World incident. And there's also a number of peculiarities and things to be aware of, when using inherited classes.
So I would recommend trying to make generic extensions, which can be used for all of your needs, e.g. (field1, field2, datefield1, etc). Then you could present the data from the fields in the description, where you can set a custom/dynamic headline for each field, based on that type of incident it is.
Thanks for the input, @Konstantin_Slavin-Bo ,
Mind sharing how could I implement "...present the data from the fields in the description, where you can set a custom/dynamic headline for each field, based on that type of incident it is."?
And when you say field1, field2... those would replace EG: Books and Sea from the Incident extension class?
Many thanks.