Attributes & Relationships

The table below explains Entity List attributes used by Adxstudio Portals. 

Name Description
Name

The descriptive name of the record. This field is required.

Entity Name

The name of the entity from which the Saved Query View will be loaded from. This field is required.

View

The Saved Query View(s) of the target entity that is to be rendered. This field is required. If more than one view has been specified, the web page will contain a dropdown to allow the user to toggle between the various views.

Page Size An integer value that specifies the number of records per page. This field is required. Default: 10
Web Page for Details View An optional Web Page that can be linked to for each record. The ID Query String Parameter Name and record ID will be appended to the Query String of the URL to this Web Page.
Details Button Label

The text displayed for the details view button if Web Page for Details View has been specified. Default: View details

For each language pack installed and enabled for the CRM Organization a field will be available to enter the message in the associated language.

Web Page for Create An optional Web Page that will be the target of the create button.
Create Button Label

The text displayed for the create button if Web Page for Create has been specified. Default: Create 

For each language pack installed and enabled for the CRM Organization a field will be available to enter the message in the associated language.

ID Query String Parameter Name A parameter name provided in the query string of the URL to the Web Page for Details View. Default: id
Empty List Text The message displayed when there are no records. For each language pack installed and enabled for the CRM Organization a field will be available to enter the message in the associated language.
Portal User Attribute An optional lookup attribute on the primary entity that represents the portal user record, either contact or systemuser that the current user's ID can be applied to filter the data rendered in the list.
Account Attribute An optional lookup attribute on the primary entity that represents an account record that the current user contact's Parent Customer value can be applied to filter the data rendered in the list.
Website Attribute An optional lookup attribute on the primary entity that represents the website that the current website's ID can be applied to filter the data rendered in the list.
Search Enabled An optional boolean value indicating if search should be enabled or not. A textbox will be rendered to allow users to do a quick search for records. Use asterisk (*) wildcard character to search on partial text. The search appends 'or' condition filters for each column in the view to the view's existing predefined filter conditions to query and return the resulting records.
Search Placeholder Text An optional string used as the label displayed in the textbox on initial load.
Search Tooltip Text An optional string used as the tooltip displayed when the mouse moves over the search textbox.

Add Custom JavaScript

The Options tab on the form contains a textarea that you can enter custom JavaScript and if your page includes jQuery library then you can use that here as well.

The script block will be added at the bottom of the web page just before the page's closing form tag.

The list gets its data asynchronously and when it is complete it will trigger an event "loaded" that your custom JavaScript can listen for and do something with items in the grid. The following is a trivial example:

$(document).ready(function (){
  $(".entitylist.entity-grid").on("loaded", function () { 
     $(this).children(".view-grid").find("tr").each(function (){ 
        // do something with each row
        $(this).css("background-color", "yellow");
     }); 
  });
});
    

Find a particular attribute field and get its value to possibly modify the rendering of the value. The following gets each cell that is for the attribute named 'accountnumber'. Replace 'accountnumber' with attribute appropriate for your entity and view.

$(document).ready(function (){
   $(".entitylist.entity-grid").on("loaded", function () {
      $(this).children(".view-grid").find("td[data-attribute='accountnumber']").each(function (i, e){
         var value = $(this).data("value");
         // now that you have the value you can do something to the value
      });
   });
});

Formatting Date & Time 

JavaScript is used to format the date.

The values of DateTime fields in the grid are wrapped in the HTML5 time element.

Example:

<time datetime="Sat, 10 Aug 2013 04:56:14 GMT">08/09/2013 10:56 PM</time>

The following JavaScript can be added to the Custom JavaScript field on an Entity List to for a datetime field. This example formats an attribute named 'createdon'. Replace 'createdon' with the attribute name for your entity and view.

$(document).ready(function (){
$(".entitylist.entity-grid").on("loaded", function () {
$("td[data-attribute='createdon'] time").each(function (i, e){
var element = $(this);
var dateString = element.attr("datetime");
var dateTime = Date.parse(dateString);
if (dateTime) {
var dateFormat = element.closest("[data-dateformat]").data("dateformat") || "MMMM d, yyyy";
var timeFormat = element.closest("[data-timeformat]").data("timeformat") || "h:mm tt";
var datetimeFormat = dateFormatConverter.convert(element.attr('data-format') || (dateFormat + ' ' + timeFormat), dateFormatConverter.dotNet, dateFormatConverter.momentJs);
element.text(moment(dateTime).format(datetimeFormat));
}
});
});
});