Hi everyone,
We created a custom entity that has a Contact lookup called [UsrConsumidor] and we need to get a value from a Contact's field called [UsrTotalPtsAcumulados].
We got an exemple from the bpm'online academy (https://academy.bpmonline.com/documents/technic-sdk/7-10/entityschemaqu…) and followed the exactly same structure, but it's not working.
var contactId = this.get("UsrConsumidor");
// Create Terrasoft.EntitySchemaQuery class instance with [Contact] root schema.
var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {
rootSchemaName: "Contact"
});
// Add column with name of main contact of accounts that refers to given contact.
esq.addColumn("UsrVouchers.UsrConsumidor.UsrTotalPtsAcumulados", "ContactTotalPtsAcumulados");
// Get one record from selection on the basis of [Id] of card object and display it in an info window.
esq.getEntity(contactId, function(result) {
if (!result.success) {
// error processing/logging, for example
this.showInformationDialog("Data query error");
return;
}
this.showInformationDialog(result.entity.get("ContactTotalPtsAcumulados"));
}, this);
The error that is given in the console is: "errorCode: "FormatException", message: "Expected hex 0x in '{0}'." "
Am I doing something wrong or is there an easier way to get an object by ID?
Best regards,
Rogério Zampieri.