CA Service Management

 View Only
  • 1.  How to call from a form/script a custom field added in servicedetails.xml?

    Posted Aug 08, 2017 01:01 PM

    Hi!

    I added two custom fields in the offerings page through the servicedetails.xml file. Now I would like to know how to get the data from that field in the form associated with the service option.

    Does anyone know how to do it?

     

    Best Regards

    Sebastian



  • 2.  Re: How to call from a form/script a custom field added in servicedetails.xml?

    Broadcom Employee
    Posted Aug 09, 2017 02:32 AM

    Good Morning Sebastian.
     
    Thanks for your question for which I want to ask you to enter 'more details', please.
     
    - Which Release is this about? (12.9, 14.1, 17.0)?
    - This is about C:\Program Files\CA\Service Catalog\view\webapps\usm\locale\icusen\service\servicedetails.xml, right?
    - What did you 'add'? Please show the lines of the file you changed.
    - How does the page look like now, with these changes applied?
     
    Thanks in advance for your understanding and help on this.
     
    With kind regards, Louis.



  • 3.  Re: How to call from a form/script a custom field added in servicedetails.xml?

    Broadcom Employee
    Posted Aug 09, 2017 04:02 AM

    Good Morning Sebastian.

     

    A local preliminary test get me thinking that only adding some line(s) to the .xml file is not enough to get this field(s) displayed on an offering's window/page.

    Please advise what you did sofar to get the new field(s) to be shown properly?

     

    Thanks in advance and kind regards, Louis.



  • 4.  Re: How to call from a form/script a custom field added in servicedetails.xml?

    Posted Aug 09, 2017 11:13 AM

    Hi Louis, thank you for your help. 

     

    - The Service Catalog release is 14.1.02

    - The file that I'm talking about is the following:
    Program Files\CA\Service Catalog\view\webapps\usm\locale\iceses\service (iceses because we use it in spanish)

    - The File was modified by a partner so maybe I don't have all the knowledge. I know that they added code in lines 72 and 111:

     

    The code added "<code>Categoria CA Service Desk</code>"

     

    The code added "<sort_number>Nivel de la Oferta</sort_number>"

     

    This changes look like this:

     

    If I add new lines to the code the changes don't appear.

     

    The main idea behind this changes is to give the catalog admins an easy way to change some values that changes in each offering. For example, a custom field for the Service Desk pcat value to assign it to the right Incident Area in SDM. Then I can call that value from the form and through javascript send it to SDM. 

     

    The issues right now are:

    - how to call this values from a form?

    - and also if anyone knows what else was modified just to show this custom fields.

     

    Thank you so much in advance!

     

    Sebastian



  • 5.  Re: How to call from a form/script a custom field added in servicedetails.xml?

    Posted Aug 09, 2017 11:38 AM

    Hi Sebastian,

     

    Just want to offer another way to accomplish this..  We have a hidden fieldset on all our Service Catalog forms which has our mapping data for Service Desk.  One of the fields is Category where we input the persid of the category.  This field can be configured to use the out of the box java integration (by adding ca_sdm_attr_category as the ID) or be passed to CA PAM.



  • 6.  Re: How to call from a form/script a custom field added in servicedetails.xml?

    Posted Aug 09, 2017 11:49 AM

    Hi Grant! Thanks for your help. We have that configuration with the java integration, but the problem with that model is that we will have to create as many forms as SDM categories we have. That's why we want one form with the ca_sdm_attr_category variable filled with the information based on the offer.



  • 7.  Re: How to call from a form/script a custom field added in servicedetails.xml?
    Best Answer

    Broadcom Employee
    Posted Aug 10, 2017 02:33 AM

    Good Morning Sebastian.
     
    Thanks for your further explanation.
     
    The first thing I notice is that you did not add a new line(code) but you changed an existing one.
    Which makes a huge difference.

     

    So, you changed the text from 'Code' into 'Categoria CA Service Desk' and saved the file.
    Form then on, this new text appears on every offering in SC/Catalog>'offering'.
     
    Internally however, this field is still recognized as 'Code'.
    Which means that to get the value of this 'Code' field on a form,
    you simply set '$(_.service.code)' in the 'value' of the named attribute 'Value'
     
    Kind regards, Louis.



  • 8.  Re: How to call from a form/script a custom field added in servicedetails.xml?

    Posted Aug 10, 2017 10:43 AM

    Good Morning Louis! You are a genius! 

    Your answer solved my problem.

    The last field that I called "Nivel de Oferta", do you know which field was originally? so I can get the variable too.