Data directive to make HDcase unmbers unique across companies?

We are migrating our case management from sugarcrm to epicor. I would like the case number sequence to generate unique case numbers across both companies.

It appears table erp.KeyLast stores the last generated values:
image

I thought I could do a in-transaction data directive so that if one row relatedToFile HDCase is updated I could also update the other company’s row. that way the BlockLastvalue between the cases would be in step, and case numbers would be unique.

I’m new to this and from some reading here it looks like the in-transaction directive won’t allow updating of other rows; and of course if it did it raises the possibility that this would cause a re-entrant infinite loop.

I could try it as a standard directive I guess… curious to see how epicor deals with the infinite recursion that may ensue.

They turn off the facade.

1 Like

I think I can prevent recursion by adding a condition: the client context company = the row changed company. As I’m wanting to update the field in the “other” company (companies) only.
Maybe.

Thanks Kevin,

I just read the thread you linked; I now know what the “facade” is… I thought at first you were being ironic or something with the prev comment :crazy_face:

I was hoping to achieve what I wanted with widgets within the data directive editor, in particular the update by query widget, but looks like it only updates in-memory tables. So looks like I would need to write some C# code which I’m not prepared for yet. Will park this for now.

1 Like

Me ?

Suspicious Monkey GIF by MOODMAN

1 Like