- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2015 08:26 AM
I've created an application that only a small group of users can see. The app requestor would like the general team to be able to view most of the records, but would like the ability to create "confidential" records when needed, which would only be viewable to the app admin, the opened by user, and the assigned to user. To accomplish this, I created a checkbox called "Confidential." Now, I'm trying to write a before query business rule to hide records IF the confidential condition is set to true, unless the user is the opened by or assigned to.
Am I even going down the right path? Any help is appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2015 08:41 AM
This should really be handled as an ACL, You can either specify this in the ACL condition, or configure it in the ACL script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2015 08:37 AM
hi Larry,
I think you are on the right track, make this modification
function onBefore(current, previous) {
if (!gs.hasRole("u_appadmin") && gs.isInteractive()) {
var u = gs.getUserID();
var isconfidential = current.addQuery("u_confidential");
if (isconfidential) {
var qc = current.addQuery("opened_by", u);
qc.addOrCondition("assigned_to", u);
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2015 08:41 AM
This should really be handled as an ACL, You can either specify this in the ACL condition, or configure it in the ACL script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 08:55 AM
Hi
Could you please let me know how the ACL has been created for the same . I have very similar requirement .