Home > Forum > Tips&Tricks > Changing Business Entity

Changing Business Entity
0

Dear all,

what would be the best practice to update/change the Business Entity of an instance?

Background:
I would like to create an application containing people related to a company respective business entity. Over the time it is possible they would change the company and so also the business entity.

I found a dirty way by using an SQL Update directly on the WFElements table, but I am struggling by running this query by (cyclic) action on a separate path. The path is walking through fine according to the history, but no changes in the end. If I run the query with the "Test" functionality in the webcon Designer everything works fine.

Do you have any idea, what is wrong or even better an other solution how I can handle such an instance change?

Thanks a lot
Thomas

MVP

Hi Thomas,

I have no idea, why I doesn't work. I'm guessing that the data is updated using your action just fine, but afterwards the default mechanism overwrite the value again. I also had a look at the SDK and changing the Company Id is not supported. So I wouldn't do it, even if it worked.

I have two other approaches in mind:
1) Use an "active" flag to track whether someone is in a company. Perhaps you could even add a start and end date. This could be applied to an item list or one workflow instance per person. This would also reflect the changes, and there will probably be a time, when you need to track this. :)

2) If you don't need the security options offered by business entities, you could use a custom field. Just create a workflow instances using the same business entity for everyone and define the 'real' business entity using a choose field.

Best regards,
Daniel

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.