Question

Esq Error

Hi, can you check my code I am reading the purchase Order and Service Category from the lookup object? And it is showing Object Object Error 

Can u tell me that where exactly the problem?

 

POFilter: function() {

                var invalidMessage="";

            var Detail = this.get("UsrFilteredPOList").displayValue;

        var esq = Ext.create("Terrasoft.EntitySchemaQuery", 

                {rootSchemaName: "UsrFilteredPOList"});

                  esq.addColumn("Name");

                  esq.addColumn("Description");

                  esq.addColumn("UsrPurchaseOrder.Name","PO");

                    esq.addColumn("UsrServiceCategory.Name","SC");

                  var esqFirstFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,

                "Name",Detail);

                esq.filters.add("esqFirstFilter", esqFirstFilter);

                esq.getEntityCollection(function (result) {

                    if (!result.success) {

                     invalidMessage=this.get("Resources.Strings.InvalidData");

                    }

                     

             //var PO={displayValue:result.collection.getByIndex(0).get("PO")};

              var SC={displayValue:result.collection.getByIndex(0).get("SC")};

            var desc=result.collection.getByIndex(0).get("Description");

       

                this.showInformationDialog(SC);

                  // this.showInformationDialog(desc);

                     },this);

                return {

                    invalidMessage: invalidMessage

                };

            },

        

            setValidationConfig :function(){

                    this.callParent(arguments);

                  this.addColumnValidator("UsrVendorUID", this.VendorValidator);

                  this.addColumnValidator("UsrFilteredPOList",this.POFilter);

            }

Like 0

Like

1 comments

Hello Bhumika,

 

From first glance, the code looks fine. Have you tried to debug it? If the code has an error you should be able to find what part of the code is incorrect.

 

Best regards,

Angela

Show all comments