Skip to main content
Skip table of contents

Custom Tab Coded Page

Coded Pages allow developers to write and use custom JS pages within the DCM application. Coded Pages are often used as tabs in detail pages or standalone pages from the left menu.

A simple example we will do is add a custom tab to a Case Detail page that executes a C# rule that calls a WebService to get the City name from a ZIP code.


  1. On the top right, navigate to 
     → <<your solution>>
  2. On the left, navigate to 
     → Setup
  3. Navigate to Business Rules → Rules (1)
  4. In the AppStudio, search for the rule "SMPL_lookupZipCode". This C# rule sample calls an external Web Service to validate a ZIP code and get the City and State names.
  5. Test the rule using the debugger. Search for a valid ZIP code (in our example, 90230) to ensure it works and check the values returned by the rule.

    The result should be like: 

    "ZIP5": "90230",
    "STATE": "CA",
  6. On the top right, navigate to 
    → <<your solution>>
  7. On the left, navigate to 
     → Setup
  8. Navigate to Forms and Pages → Coded Pages (1)
  9. Click on the 
     New Coded Page button (2).
  10. Assign a Name to the page. In our example, Simple Tab Example.
  11.  Download the JS sample code from this link CodedPage-SimpleTabExample.js and insert it in the JavaScript Code area.
  12. Click the Save & Close button.
  13. The next step is to add this coded page in the Case Detail page into a new tab.
  14. Navigate to Forms and Pages > Detail Pages and open the AUTO LOAN detail page.
  15. In the Case Detail Page Builder Drag&Drop a Generic tab to the page.
  16. From Content Type select Coded Page, add ‘Simple Tab Example’ for Tab Title, and in the Coded Page dropdown select ‘Simple Tab Example’. Save
  17. Save your changes to the detail page.
  18. Preview the detail page using any valid case from the list. Enter a valid ZIP Code (for example 90230) and click on the Get City button, you will retrieve CULVER CITY in the City field.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.