How to change a field to Read only for certain users in Kinetic?

I need to make a field read only for all users but one. I made the change on Field Security maintenance but people on Kinetic can still change it. Do these two not communicate? If so, has anyone made a customization on Application studio that can accomplish this? My last resort would be to do via a BPM.

A BPM could check if the field is changing and what the user is then throw an error to stop the change.

A layer event could set the field read only and I believe it can check the user logged in but I haven’t done that myself yet.

Below is a refernce to steps in doing this in App Studio.

^ This part doesn’t make too much sense, though. Field security should work. :thinking:

2 Likes

Let me take a look.

1 Like

So if I only want to base it off the current user do I need the Data View?

I know what you mean but I changed the default access to read only and witnessed someone do it right in front of me.

Its a bug. Kinetic does honor field security, it just doesn’t look like it. If you click save and refresh you will see the value reverts.

5 Likes

Yes, if you want to do the App Studio route, you need the UserFile dataview. You don’t need it to use Constant.CurrentUserID… but the UserFile dataview is what pulls in the security Group information for that specific user so you can set up data-rules against them.

1 Like

Hey Alisa,
I wish that were the case here, but users are definitely able to change it. I triple verified just to be sure.
Here the security field maintenance.

And I have verified that users are able to change it, save, back out, bring up the order, and the changes are there.

Oh its sales rep list. I think that one is tricky because that isn’t the field the UI is actually bound to.

1 Like

You are correct they are pointing to a SalesRepCode1-5. I don’t see those in the field security maintenance.

They aren’t real fields. The data is taken in through the UI and aggregated in that sales rep list in the backend. I have never tried to secure those field security so it may just not be possible, not sure.

1 Like

The approach I would like to take is to make the field read only for all but one user. Going to try to use the kinetic route as it’s the only route where I can see the SalesRepCode1-5.

1 Like

Can I not set up Data Rules for a specific User?

I would think so, though I’ve never done it.

Set a rule condition where the Constant dataview, CurrentUserID column = value of that person’s userID.

If a row rule doesn’t work, you can definitely do it in an event condition.

1 Like

If you want to do it in the UI, this is how I have done it before:

  • Write a baq that returns a true/false value for each user id on whether they have access
  • Put a criteria in the baq to limit user file to the current user
  • Put an event in the UI to load the BAQ on getbyid
  • Use the true/false value in your data rule
1 Like

Update. I was able to use the recommendation @dcamlin suggested. I added a Data Rule on OrderHed using the Constant Data View, CurrentUserID field, not equal to the user that needs the access for Condition. And set the Action = SettingStyle.ReadOnly for each SalesRepCode1 field (1-4).

3 Likes