Answered

Process entity initialization before first task

Hi,

I'm trying to attach (don't want to create duplicate records) a master entity's values to the process entity just before the first task of process. The code below works fine if executed after first task. But it is not working when executed before first task since the process entity has not been initialized (not persisted and don't have an id). Attach function is not working either. Is there a way to implement this requirement?

var MasterEntityList = CEntityManager.GetEntity("MasterEntity").GetEntityList("","","","");

for (var i=0;i<MasterEntityList.Length;i++)

{

CHelper.setAttrib("MasterEntity",MasterEntityList.SurrogateKeyValue,"MyProcessEntity",<MyProcessEntity.Id>);
}
Thank you.

photo
0

Dear Yetkin,

In order to solve this question, please tell us what is the main idea to do this. Why you are trying to this with master values. Also, if you have screenshots of your data model and process, please send them.

Thank you in advance,

photo
0

Hi Juan,

The main idea is monitoring and controlling records that are produced by other cases. As I said before it can be done in onenter action of second task of the process since Id of the process entity is already created.

photo
0

Dear Yetkin,

In order to follow up this topic, we would like to have a screenshot of the data model and explain us using it in a document.

Thank you in advance