Not a Problem

Error when I try to get an Entity

Hi.

I'm trying to get a unique row from an Entity by using GetEntity method in an expression. However, when I execute the process I get the error "Error Entity metadata not found. Entity Id: -1. - There is no row at position 0.". I don't know what is going on.

I'm using the method like this: config = CEntityManager.GetEntity("ReceberInformacoesGerenc.ConfigInformacoesGerenci").GetEntityList("cod_config", "1", "","");

Where cod_config is an attribute. I'm sure there is at least one row with this attribute and the specified value. Please help me.

Comments (4)

photo
1

I've also noticed that in the database it seems like the only record that exists is in the row 1 and not in the row 0. Could it be that the problem?

photo
1

Dear Mariana,

You are are using the function in a wrong way. Bear in mind the search option. The following is the syntax of the EntityManager function (for further information: http://help.bizagi.com/bpm-suite/en/index.html?access_entities_not_related_to.htm):

CEntityManager.GetEntity("Entity").GetEntityList("Attribute","Filter","Search","Order");

The function has one mandatory parameter, specifically the first parameter, which is the name of the entity to access.

The remaining parameters are optional, and used at your discretion.

  • Attribute: The name of the attribute (table column) to be filtered (used in conjunction with the Filter parameter).
  • Filter: The value of the Attribute to be filtered (used in conjunction with the Attribute parameter).
  • Search: Filters the entity according to several conditions.
  • Order: Attribute used to arrange the search.

Best Regards

photo
1

Hello Juan, thank you for your reply.

I don't understand what I'm doing wrong. I'm using the function like this:

CEntityManager.GetEntity("ReceberInformacoesGerenc.ConfigInformacoesGerenci").GetEntityList("cod_config", "1", "","");

Where "ReceberInformacoesGerenc.ConfigInformacoesGerenci" is the name of the entity, "cod_config" is the name of the attribute that I want to filter and 1 is the value of the attribute. Could you please point to me what I'm doing wrong? Thank you!

photo
1

Dear Mariana,

The number 1 is not enough to filter the entity. You need to use like: "Cod_config = 1" or "finalEnt=10016"

Regards