Hello again. I wanted to ask about the "ManageWorkCenter" Buisness Component(BC). Specifically, this component's current ability to both Update and Create a WorkCenter.
Due to how we intend to implement WorkCenter Creation and WorkCenter Updates, I need a way to ensure that I can avoid updating an existing WorkCenter by accident.
An example of the current flow that has the potential to cause problems:
1) Open the "New WorkCenter" page. Input WorkCenter1, & relevant Data => Data arrives at ManageWorkCenter BC.
2) ManageWorkCenter finds an extant WorkCenter1, and updates WorkCenter1.
An example of the flow I want:
1) Open the "New WorkCenter" page. Input WorkCenter1, & relevant Data => Data arrives at ManageWorkCenter BC.
2) ManageWorkCenter finds an extant WorkCenter1, and returns an Error message stating "WorkCenter1 already exists"
The same applies for the Update process. The UI is locked down and takes data from a DataGrid selection, so it should not create a new WorkCenter. But I would feel safer if I could add a restriction of some sort.
I am currently looking at the "flx_spWorkCenterInsert" Stored Procedure as an alternative.
Edit: So, I've slept on this a bit. And the idea I have right now is to run a validation before bringing the data to ManageWorkCenter. I would run an SQL query with the inbound data. (WorkCenter, Facility, Division, Department), then based on the output (Count = 0) or LastDeleteOn value (If a matching WorkCenter was deleted previously) , send an error, or proceed to the ManageWorkCenter BC
Flow : NewWorkCenterScreen => Input WorkCenter1 & Relvant Data => SQL Query for matching database values. If matching values are found, cancel the operation, unless[LastDeleteOn] is not null or 01/01/1900 12:00:00 AM. => Send data to ManageWorkCenter
In my opinion, this still has a risk of updating the "deleted" entry.
Any pointers towards documentation, or help would be greatly appreciated. Thanks in advance!
