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.
Steps
On the top right, navigate to → <<your solution>>
On the left, navigate to → Setup
Navigate to Business Rules → Rules(1)
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.
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 next step is to add this coded page in the Case Detail page into a new tab.
Navigate toForms and Pages > Detail Pagesand open the AUTO LOAN detail page.
In the Case Detail Page BuilderDrag&Dropa Generic tab to the page.
From Content TypeselectCoded Page,add‘Simple Tab Example’ for Tab Title, and in the Coded Page dropdownselect‘Simple Tab Example’.Save
Saveyour changes to the detail page.
Previewthe 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 retrieveCULVER CITYin the City field.