Add onEntityInitialized in the methods where you'll retrieve the value from the account using the record's Account and store it in the attribute:
onEntityInitialized: function(){this.callParent(arguments);
var account =this.get("Account");if(this.isAddMode()||!account){return;}
var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
rootSchemaName:"Account"});
esq.addColumn("UsrScore");
esq.getEntity(account.value, function (result){if(result.success){this.set("AccountScore", result.entity.values.UsrScore);}}, this);}
Lastly, you'll need to add an element to the diff bound to the attribute to display it on the page. Easily way to do this is to drag something not currently on the page, like ModifiedOn, then find it in the diff and change the name and bindTo (make sure you set it as disabled):
Add onEntityInitialized in the methods where you'll retrieve the value from the account using the record's Account and store it in the attribute:
onEntityInitialized: function(){this.callParent(arguments);
var account =this.get("Account");if(this.isAddMode()||!account){return;}
var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
rootSchemaName:"Account"});
esq.addColumn("UsrScore");
esq.getEntity(account.value, function (result){if(result.success){this.set("AccountScore", result.entity.values.UsrScore);}}, this);}
Lastly, you'll need to add an element to the diff bound to the attribute to display it on the page. Easily way to do this is to drag something not currently on the page, like ModifiedOn, then find it in the diff and change the name and bindTo (make sure you set it as disabled):