Select datasource for custom lookup control

Hi all,

       I add an attribute which type is LOOKUP to a custom page like this

      attributes: {

                  "ContactId": {

                          "dataValueType": this.Terrasoft.DataValueType.LOOKUP,

                          "type": this.Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,




      And then, I want its datasource is Filtered Contacts with condition is "he/she has mobile phone number". I know "lookupListConfig", but can't set Contacts is the datasource. Please help me to do that.

Many thanks

Like 0



From where I stay it's much easier to add the "contact" column into the related object and then apply the filtration with a business rule. 

attributes: {
"WO": {
	dataValueType: this.Terrasoft.DataValueType.LOOKUP,
	type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
	caption: "Some caption",
	hideActions: true,
	value: {
		value: "",
		displayValue: ""
	referenceSchema: {
		name: "Contact",
		primaryColumnName: "Id",
		primaryDisplayColumnName: "Name"
		referenceSchemaName: "Contact"
setWO: function(){
   this.set("WO", XXXXXXXXXXXX)


Eugene Podkovka,

Hi Eugene,

        Because I did a custom campaign element, I don't have any object to add relationship to Contact.…


Kirill Krylov CPA,

Hi Kirill

    It works well


Show all comments