Scoped GlideSPScriptable - getRecord()

Returns the current portal context.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
GlideRecord The sp_portal record of the current portal context or null. Returns null if the widget is embedded by another widget.
//Server script
(function() {
    var portalGr = $sp.getPortalRecord();
    data.logo = portalGr.getDisplayValue("logo");
    data.homepage = portalGr.getDisplayValue("");

//HTML template
    <img ng-src="{{}}" />
    <a href="?id={{}}">Click here to go home</a>