Question

ESQ Error

var eventType = "Wedding";
var esqDetail = this.Ext.create("Terrasoft.EntitySchemaQuery", {
                    									rootSchemaName: "UsrEventDemo"
                									});
 
esqDetail.addColumn("UsrName");		
var groupFilters = this.Ext.create("Terrasoft.FilterGroup");
 
var filterTournType = this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "UsrTypeId.Name", eventType);
 
 
                				var filterId = this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.NOT_EQUAL, "UsrName", thisId);
                				var filterIsActive = this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "UsrIsActive", "1");
                				groupFilters.addItem(filterTournType);
                				groupFilters.logicalOperation = this.Terrasoft.LogicalOperatorType.AND;
                				groupFilters.addItem(filterIsActive);
                				groupFilters.logicalOperation = this.Terrasoft.LogicalOperatorType.AND;
                				groupFilters.addItem(filterId);
                				esqDetail.filters.add(groupFilters);
								esqDetail.getEntityCollection(function(result) {
									 if (!result.success) {
										 Terrasoft.showInformation("Request Error.");
                                     }
                               })

The above code returns ItemNotFoundException error with a message Collection item with  name UsrTypeId not found.



I have UsrEvent object and it has a lookup called event type.  Please, help me understand what is wrong with the above syntax.

Like 0

Like

1 comments

Hi,

 

You need to change the UsrTypeId.Name column path in the filter to UsrType.Name. This will fix the "Collection item with name UsrTypeId not found." error message

Show all comments