Architecture/Coding Questions (Kinetic Web UI) - Integrated Access Control (Physical)

OK, backstory.

I’ve been asked to integrate our physical access control into Epicor.
For example, gates and doors. Fob Readers / Keypads to be exact.

Epicor will not be running the opening and closing of doors, but instead acting as the
repository of knowledge, and platform to build management tools on.

A local service will sync with Epicor on a schedule (Probably every 5 minutes or so), and
handle the dirty work locally.

We will do logging and such through Epicor as well.

Technical:

I am using a UD Table to store Fob Information, and at current, it is one to one records, with the
primary key being either an EmpBasic.EmpID for Employees, and a Percon.PersonID? for Contractors.
These types are distinguished by a type field.

Primary management is planned to be the “Employee” App for Employees, and the “Person / Contact” App for Contractors. These will be customized and secured for appropriate roles/people.

Employees are managed by HR/IT, and Contractors by Purchasing/IT.

Anyway, on to my questions.

We plan to do something similar to both apps, but I will limit this to just “Employee”, as the solutions
will be similar.

I would like to do as much of this on the server as possible, so what I want to do is when
appropriate conditions are met, (open correct customization / layer, user authorized) is to inject
this data into the form / layer so the fob information can be manipulated, and saved on update.

My thought was, to create a field, or fields to use in EmpBasic, so when conditions are right,
that data is populated, and on update, it is discarded from EmpBasic, and saved appropriately
in the UD Table.

This works fine, however, while my task is simple at the moment, we may add schedules, etc in the
future, or more readers bla bla bla.

So what I really want to do in that field, is bring down a json object, that I can manipulate with code,
instead of adding fields every time I need to bring in something new, or want to change the architecture.

In classic, this is easy, in Kinetic, I’m not so sure.

So, I guess what my question is…

Say I add a field to EmpBasic.
Populate it on read from the server, with a json object.

Can I break that json object down in the Kinetic web UI into fields/controls ?

Can I pack it back up again into json for the Update/Save?

That’s where I’m at.

Any insight would be appreciated.

If it actually comes back from the function as a JSON object, sure, but as far as I know your best bet would be to convert the JSON object into a dataset and pass that back to Kinetic at which point you can than assign it to a dataview and do the thing.
Same for the reverse–you would need to pass the dataset back into the function and then use Newtonsoft to do the rest server side.

Well it depends on your definition of object :slight_smile:

The field would be a string.

Noop. App Studio has no way to parse the string.
Objectify that shit… in the form of a dataset!

1 Like

That’s kind of what I was wanting, and hoping to avoid if that makes sense.

Bring the dataset down as json, in the original dataset, and parse it.

I guess I’ll have to hook into a loading event and bring it down in the layer
itself, and pass it back up on save.

:frowning:

You actually CAN extend the original dataset, and it will come down and be able to
use it in the Kinetic Web UI, however then the same solution does not work in Classic,
as the dataset goes through a merge, and that data is lost :frowning:

So damn.

Am I reading this right? Instead of simply adding the proper fields, your are going to shove a whole bunch of stuff into a single field?

And now I think you’ve finally found the limitation of dealing with cloud…

Surprised Wait What GIF

Yes and no.

Not really, nothing is really stored in EmpBasic, the idea was just to add a field for ease of passing data
down for processing. The data is injected at read, and stripped at update. The data is stored in another
table.

I liked the idea better of doing the read of this data on the server at getbyid, putting it in the
dataset, and stripping/storing the data on update, instead of load form, pull data, store data.

I guess it boils down to preference. I’m open to trying whatever I can as long as it’s
clean and easy to maintain.

I’m not quite sure how that factors in this time, as I think I would be in the same boat.

Be on-prem and write it to local storage.

:person_shrugging:

That would completely negate why we would put it in there.

If this is what you want, then I would do a web app and call functions to store information in Kinetic. Not sure I would use the Kinetic UI for anything other than requesting reports and viewing data. Keep those separation of duties and it seem easier to maintain IMHO.

Why not use a UD table then?

what is going on matthew perry GIF

This was a callback and not a serious proposal.

I am. You need more coffee? :rofl:

I’m just putting the management functions on the appropriate forms.

Can’t you just add a foreign key view?

Or a BAQ data view?

I couldn’t get that to work in classic, no idea at all how to make it work in Kinetic :rofl:

Just a reminder, ya’ll throw out whatever you’re thinking. I’m a big boy:

I woudl say storing this information in a UD Table and bringing it in via FKV (pretty easy in both classic and kinetic) would be the best bet. Or even a BAQ Data View.

Then you can use the built in mechanics to update / change the data and save it back.