Custom Portlets in SDF Custom Objects

You can create Custom portlets in SuiteCloud Development Framework (SDF) using the publisheddashboard SDF custom object. For information about the appropriate context, see Published Dashboards as XML Definitions.

Custom portlets run portlet scripts on a dashboard. For more information about portlet scripts, see SuiteScript 2.x Portlet Script Type.

Custom portlets in SDF are represented with the customportlet element. You can specify this element in a dashboard of a published dashboard object.

Custom portlet objects consist of a source element that refers to a deployment of a custom portlet script, and a parameters fragment that refers to the parameters defined in the portlet script record. The following example shows a custom portlet definition that runs a deployed portlet SuiteScript named customscript_myportlet that contains three parameters, one called custscript_myportlet_title and value Financials; a second one called custscript_myportlet_something and taking a value from a custom record; and a third one called custscript_myportlet_checkbox and value T:

          <customportlet>
    <source>[scriptid=customscript_myportlet.customdeploy_deployment]</source>
    <parameters>
        <parameter>
             <id>[scriptid=customscript_myportlet.custscript_myportlet_title]</id>
             <value>Financials</value>
        </paramter>
        <parameter>
             <id>[scriptid=customscript_myportlet.custscript_myportlet_something]</id>
             <value>[scriptid=customrecord_id.somevalue]</value>
        </paramter>
        <parameter>
             <id>[scriptid=customscript_myportlet.custscript_myportlet_checkbox]</id>
             <value>T</value>
        </paramter>
    </parameters>
</customportlet> 

        

If the parameter tag is present, it must include an id and a value. The id must reference an existing custom field in the portlet, and the value must be of the type specified for that parameter. For example, if the custom field is of type checkbox, you must enter either T or F for the value field.

Note:

There is an existing limitation in the parameter storage on the DB. This limitation implies that if the concatenation of all the parameters exceeds the maximum number of characters allowed (999 bytes), the deployment throws a generic error (An error occurred during SDF custom object update), but you don't see a validation errors for the individual parameters as they are individually meeting the limit applied to that parameter type.

For more information about custom portlets, see:

Related Topics

Supported Published Dashboard Object Portlets
Analytics Portlets in SDF Custom Objects
Calendar Portlets in SDF Custom Objects
Custom Search Portlets in SDF Custom Objects
Event Scheduler Portlets in SDF Custom Objects
Key Performance Indicator (KPI) Portlets in SDF Custom Objects
Key Performance Indicator (KPI) Scorecard Portlets in SDF Custom Objects
KPI Meter Portlets in SDF Custom Objects
Links Portlets in SDF Custom Objects
List Portlets in SDF Custom Objects
My Login Audit Portlets in SDF Custom Objects
Gantt Chart Portlets in SDF Custom Objects
Project Info Portlets in SDF Custom Objects
Project Profitability Portlets in SDF Custom Objects
Project Links Portlets in SDF Custom Objects
Quick Search Portlets in SDF Custom Objects
Recent Records Portlets in SDF Custom Objects
Recent Reports Portlets in SDF Custom Objects
Report Snapshot Portlets in SDF Custom Objects
Reminders Portlets in SDF Custom Objects
Search Form Portlets in SDF Custom Objects
Settings Portlets in SDF Custom Objects
Tasks Portlets in SDF Custom Objects
Trend Graph Portlets in SDF Custom Objects

General Notices