RECOMMENDATION: If you are using a version of The Portal Connector higher than 4.0, we strongly recommend utilizing the MVC based widgets and components to create your site. This documentation is for legacy purposes only and will soon be deprecated.

add_valueChanged()

Fired when the value of the widget is changed by the user. 

The event handler function context (Available via the this keyword) will be set to the widget instance.

Parameters

Function

Returns

get_type()

Returns the widget type

Parameters

None

Returns

String

enable()

Enable the widget on the page.

Parameters

None

Returns

None

required()

Allows to Enable or Disable client side validation  

Parameters

Boolean

Returns

remove_valueChanged()

Removes any delegate hooked up to the add_valueChanged() event.

Parameters

Function

Returns

None

disable()

disable the widget on the page.

Parameters

None

Returns

None

clear()

clear the value of the widget

Parameters

None

Returns

None

get_addButton()

Returns the add button element associated with the widget.     

Example-Lookup Fetch Add Button Element

tpc.forms[0].TpcLookup.get_addButton();
Parameters

None

Returns

JQuery Object     

get_container()

Returns the container element of the widget.

Example-Lookup Fetch Container Element

tpc.forms[0].TpcLookup.get_container();
Parameters

None

Returns

JQuery Object

get_editButton()

Returns the edit button element associated with the object.

Example-Lookup Fetch Edit Button Element

tpc.forms[0].TpcLookup.get_editButton();
Parameters

None

Returns

JQuery Object

get_element()

Returns the element associated with the widget.

Example-Lookup Fetch Element

tpc.forms[0].TpcLookup.get_element();
Parameters

None

Returns

JQuery Object

get_fetchValue()

Returns the value of the widget that is compatible with FetchXML filtering.

Example-Lookup Fetch Fetch Value

tpc.forms[0].TpcLookup.get_fetchValue();
Parameters

None

Returns

String

get_input()

Returns the input element of the widget.

Example-Lookup Fetch Input Element

tpc.forms[0].TpcLookup.get_input();
Parameters

None

Returns

JQuery Object

get_kendoInput()

Returns the kendo ​dropdown list object associated with the ​widget.

Example-Lookup Fetch Kendo Input

tpc.forms[0].TpcLookup.get_kendoInput();
Parameters

None

get_kendoWindow()

Returns the kendo window object associated with the widget.

Example-Lookup Fetch Kendo Window

tpc.forms[0].TpcLookup.get_kendoWindow();
Parameters

None

get_model()

Returns the model object ​of the widget, which contains a number of useful properties related to the widget.

In the case of the CRM ​Lookup widget, these returned properties and their types are:

  • AddRecordPageUrl: String
  • AllowAddingRecords: Boolean
  • AllowEditingRecords: Boolean
  • CascadeFields: Array
  • ControlDataId: String
  • DisplayAttribute: String
  • EditRecordPageUrl: String
  • EnableVirtualization: Boolean
  • ReadOnly: Boolean
  • ValueAttribute: String
  • WindowHeight: Integer
  • WindowWidth: Integer

Example-Lookup Fetch Model

tpc.forms[0].TpcLookup.get_model();
Parameters

None

Returns

Object

get_value()

Returns the value of the widget.

Example-Lookup Fetch Value

tpc.forms[0].TpcLookup.get_value();
Parameters

None

Returns

String

get_windowPlaceholder()

Returns the modal window associated with the widget.

Example-Lookup Fetch Window Placeholder

tpc.forms[0].TpcLookup.get_windowPlaceholder();
Parameters

None

Returns

JQuery Object

hide()

Hides the widget from the form.

Example-Hide Lookup

tpc.forms[0].tpcLookup.hide();
Parameters

None

Returns

None

show()

Shows the widget on the form.

Example-Show Lookup

tpc.forms[0].TpcLookup.show();
Parameters

None

Returns

None

set_value()

Sets the value of the widget.

Example-Lookup Set Value

//In the case of the CRM Lookup, values must be set in a particular way: "[EntityName];[RecordGuid]" tpc.forms[0].TpcLookup.set_value("account;0bb0d542-ac30-faad-7dbd-e9cccce27379"); tpc.forms[0].TpcLookup.set_value("​contact;550e8cb4-f874-be99-bd18-8bdf84750070");
Parameters

String

Returns

None

toggle()

toggles the visibility of the widget. ​

Example-EXAMPLE-Lookup TOGGLE

tpc.forms[0].tpcLookup.toggle()
Parameters

None

Returns

None

readonly()

 set the widget state to read only

Example-Lookup- READONLY

//set to true
tpc.forms[0].TpcLookup.readonly(true);

//set to false
tpc.forms[0].TpcLookup.readonly(false);

//show the read only status
tpc.forms[0].TpcLookup.readonly();
Parameters

true, false

Returns

None