Answered

Set value of entity attribute (Wich is a entity itself)

Hello!,

I have this expression where i execute Stored Procedure on a database, return some values and set entity values:

var ccirif = <GestiondePermisos.UserEntity>;var ccivalidated = SPProvider.Controller.ValidarEnteCreado(ccirif);if(ccivalidated == true){var MyResult = SPProvider.Controller.CargarDatosdeEnte(ccirif);for(var i = 0; i < MyResult.Tables[0].Rows.Count; i++){ var tempRow = MyResult.Tables[0].Rows; <GestiondePermisos.UserNames> = tempRow["Nombres"]; <GestiondePermisos.UserLastNames> = tempRow["Apellidos"]; <GestiondePermisos.Identification> = tempRow["Cedula"]; <GestiondePermisos.UserSucur> = tempRow["CodSucursal"];}}else{CHelper.ThrowValidationError("No se encontro Promotor con ese Ente. Verifique el No. de Ente Ingresado");}
Everything works fine except the last set:
<GestiondePermisos.UserSucur> = tempRow["CodSucursal"];
this is not setting the usersucur attribute to my entity. I belive that this is because UserSucur is a related master entity. How can i acomplish this? I want to "select" the userSucur from my tempRow["CodSucursal"]. it this possible?
Thanks!.

photo
0

Dear Joel,

According this question, the value cannot be set into <GestiondePermisos.UserSucur> because UserSucur is a attribute with a relationship with another entity and it is trying to assign a value where maybe SP does not met the same information that Bizagi information. You can enable traces to check values into the expressions: http://help.bizagi.com/bpmsuite/en/index.html?error_control_and_diagnostics_.htm

For these cases, we recommend to virtualize and/or replicate entities.

You can share a data model with us.

Best regards