Can i anyone help me out to get correct esq query for
SELECT
[Account].[Name]
FROM
[dbo].[Order]
LEFT OUTER JOIN [dbo].[Account] ON ([Account].[Id] = [Order].[AccountId] )
WHERE ([Order].[Id]='10643C0B-4932-415C-9150-91458492BBBE')
My esq query:
var esq = Ext.create("Terrasoft.EntitySchemaQuery", {rootSchemaName: "Order"});
esq.AddColumn("[Account:Id:AccountId].Name");
//esq.addColumn("Name");
var FirstFilter = esq.createColumnFilterWithParameter
(Terrasoft.ComparisonType.EQUAL,"Id", this.get("UsrPONo").value );
esq.filters.add("first", FirstFilter);
esq.getEntityCollection(
function(result) {
if (result.success) {
//assigning collection to the variable
var items = result.collection.getItems();
var name = items[0].values.Name;
this.set("UsrAccount",name);
}
}, this);
I could not get the name of the account using this.