Reviewing Custom HTML fields with JavaScript


This topic troubleshoots migration of Custom HTML type fields with JavaScript from FootPrints version 11.0 to FootPrints version 12.0.

Description

The following table describes Custom HTML type field in FootPrints version 11.0 to version 12.0.The [confluence_table-plus] macro is a standalone macro and it cannot be used inline.

Resolution

To resolve this issue, review your Custom HTML type fields with JavaScript, and determine whether you have a business need for the functionality they provide. The FootPrints version 12.0 has new and improved capabilities, that are not available in FootPrints version 11.0. You may no longer need to use custom JavaScript code for your business purposes. 

Use the following guidance to determine what functionality in FootPrints version 12.0 might address your needs:

  • In FootPrints version 12.0, you can customize the appearance the UI by creating custom consoles and portals.
    For example, you can select a theme for each portal. To manage portals and consoles, navigate to,
    • Administration > Portal Management > Portals
    • Administration > Portal Management > Consoles
  • In FootPrints version 12.0, there are separate forms for Agents and Customers; each form might have different fields and layouts. To manage forms, navigate to Administration > Workspaces > (workspace) > Record Definitions > (ticket) > Forms. For more information, see Configuring-sections-on-forms.
  • In FootPrints version 12.0, to show an image on a form, you can use an Image field. An Image field can be static or dynamic. The image for a static image field is defined while configuring the control on the form, and the image for a dynamic image field is defined while editing a ticket.
    To place an image field on a form, navigate to Administration > Workspaces > (workspace) > Record Definitions > (ticket) > Forms
    Review Custom HTML Fields with JavaScript1.png
  • In FootPrints version 12.0, you can create business rules that execute instantly on the screen. To configure business rules, navigate to Administration > Workspaces > (workspace) > Record Definitions > ticket > Business Rules. For more information, see Configuring-business-rules.
  • Based on your requirement, you can choose to create a business rule from the different types of rules available. You can select an On Screen rule type for rules intended to execute instantly on the screen while a ticket is edited. Other rule types, like Default Assignment or Auto Assignment, are more specific to the goals that you want to achieve. A rule type offers only a subset of triggers and actions, which are making sense for the particular type of rule. For more information, see Types-of-business-rules and Selecting-triggers-for-business-rules.

    The following example explains rule that allows hiding the Closure Category and Closure Date fields for tickets that are not in the Completed or Closed state:Type: On Screen
    Triggers: On Page Load (On Create, On Update)
    Criteria: Status not equal to Completed or Closed
    Action: Change Field Visibility; Field: Closure Category; Visibility: Hide field
    AND 
    Action: Change Field Visibility; Field: Closure Date; Visibility: Hide field
  • HTML/Code control in FootPrints version 12.0 allows you to define the code content type (HTML or JavaScript).
    The following image displays Control Properties of HTML/Code control:
    Review Custom HTML Fields with JavaScript2.png
    Navigate to Administration > Workspaces > (workspace) > Record Definitions > (ticket) > Forms > Form Controls > HTML/Code control
  • When a user opens a form to create, edit, or view a ticket, the entered code is executed. If this control is the best means of accomplishing the functionality of the FootPrints version 11.0 Custom HTML type field, then analyze the JavaScript code used in your FootPrints version 11.0 system. Adapt the code displayed in the migration report and based on your requirement, modify it to work on FootPrints version 12.0.
  • Test the code and make sure you get the desired result before using it in a production environment.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

FootPrints 20.19 R1