Home Asset Management

Custom class form

Dean_MrazekDean_Mrazek Customer IT Monkey ✭

Hi

We have a custom class for network devices, however, how can we find out which form the custom class is using in the cireson portal?

Best Answer

  • Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭
    edited June 4 Answer ✓

    @Dean_Mrazek so you want to create your own custom form for your custom class?
    You need to create a file with the name of your custom class, in your case COMPANYNAMENetworkDevice.js, inside the folder C:\inetpub\ciresonportal\customspace\configitem

    Then you can define the form. The easiest way to do so, is to use a predefined template under C:\inetpub\CiresonPortal\Scripts\forms\templates, copy it to the configitem folder inside customspace and rename it to the name shown above. After that you have to rewrite the definition so it fits for your class. This Kb Article might help you:


    I would also recommend adding your class do the dynamic data as described here:

Answers

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.

    Hi @Dean_Mrazek

    In your Portal files, open CustomSpace / ConfigItem

    In there will be a file for each CI Class form you have. The file name is the exact internal class name.

    eg DIT.NetworkDevice.js

    Hope this helps,

    Geoff

  • Dean_MrazekDean_Mrazek Customer IT Monkey ✭

    Hi @Geoff_Ross

    Having checked there, I could only see the below files. I checked in \InetPub\CiresonPortal\CustomSpace\ConfigItem is there anywhere else the forms can be stored?

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.

    Hi @Dean_Mrazek
    In your browser, open the F12 Dev Tools and in the console tab, type the following:

    pageForm.viewModel.ClassName
    

    This will show the full internal class name and thus the name of the js file you should be looking for.

    Its bad practice but these files can also reside in the root of the website \InetPub\CiresonPortal\CustomSpace

    If its not in either place you must be using the default generated form.

    Geoff

  • Dean_MrazekDean_Mrazek Customer IT Monkey ✭

    Hi @Geoff_Ross

    Thanks! Running that command returns for me COMPANYNAMENetworkDevice. Since I can't find that file in either  \InetPub\CiresonPortal\CustomSpace\ConfigItem or \InetPub\CiresonPortal\CustomSpace. I assume this means that we're using the default generated form. Where can I find the template/form for this? I checked InetPub\CiresonPortal\Scripts\forms\templates but couldn't find any there which points towards config items.

  • Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭
    edited June 4 Answer ✓

    @Dean_Mrazek so you want to create your own custom form for your custom class?
    You need to create a file with the name of your custom class, in your case COMPANYNAMENetworkDevice.js, inside the folder C:\inetpub\ciresonportal\customspace\configitem

    Then you can define the form. The easiest way to do so, is to use a predefined template under C:\inetpub\CiresonPortal\Scripts\forms\templates, copy it to the configitem folder inside customspace and rename it to the name shown above. After that you have to rewrite the definition so it fits for your class. This Kb Article might help you:


    I would also recommend adding your class do the dynamic data as described here:

  • Dean_MrazekDean_Mrazek Customer IT Monkey ✭

    Thanks so much!

Sign In or Register to comment.