workflow to update a status field of an entity that is one removed from the entity that would trigger the onchange event
sábado, 9 de fevereiro de 2008 01:22
I need to have a workflow to update a status field of an entity that is one removed from the entity that would trigger the onchange event.
Here's the scenario. I have an entity (let's call it E3) that updates date field, and when that field is changed, it fires the workflow. The E3 entity is directly related to the E2 entity (E2 is the parent of E3). But the target status field that needs to be updated is found in entity E1, which is related to E2, but not directly to E3.
My thoughts are that I can have the workflow fire from entity E3 to update a status field located in entity E2, and then a second workflow would fire from the onchange event on entity E2 that would then update the status field found in entity E1, the intended result.
Will this work, and if so how would I go about configuring it? One key requirement of my solution would require workflows to fire from an onchange event on a form that is not opened and been changed from user interaction.
I hope I have effectively described this scenario. Any comments are appreciated.
Todas as Respostas
sábado, 9 de fevereiro de 2008 07:12Moderador
Update event of workflow is not in CRM 3.0, for that you have to write PreUpdate / Post Update Callouts.
In CRM 4.0 yes you can use workflows on update event and check the date chang and fire workflow.
Let me know if you need more this, It could be possible to achieve this through .net Code for CRM SDK.
sábado, 9 de fevereiro de 2008 07:34Moderador
sábado, 9 de fevereiro de 2008 16:12
I guess I should have said I am working with MSCRM 4.0 (actually CRM Live EA2). Getting the event triggered is not the problem. I need to change the status field that is not directly related to the OnChange event, but the target status field is related to the entity that is directly related to the entity that is actually triggering the event (see diagram below). The status field in entity E2 is not needed but is used to park the status so it can be transfered via the second workflow to entity E1. Thanks.
______________ _______________ ______________
| E1 | | E2 | | E3 |
| status field | <-------- | status field | <---------- | field with |
| target | | not target | | OnChange |