Change sponsor and Change coordinator to be able to attach documents when Change is in 'Change Review / Pending Approval' State.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2017 11:43 PM
Change sponsor and Change coordinator to be able to attach documents when Change is in 'Change Review / Pending Approval' State.
"Change sponsor" & "change coordinator" both are the fields in change form.
I need to write a ACL to grant acces for this on SYS ATTACHMENT TABLE .
Please help me with this as Im not understanding how i can write a ACL for the change on SYS ATTACHMENT TABLE.
please find the attachment of SYS ATTACHMENT TABLE COLUMNS.
kindly help me with this as i have stuck with this.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 10:10 AM
Awesome !!!!Good approach ,Thanks Rashmi I will try it ,But this line if(changesponsor != '' && gs.hasRole('Change_manager')) //replace with some role who can be change sponsor or coordinator
I am not getting this because we dont need to give role,only if current logged in user is changesponsor or changecoordinator than we need to give access
How can i get that?
Please let me know
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 10:15 AM
gs.getUserID gives current logged in user sys id
answer = getAttachmentRights();
function getAttachmentRights(){
var changesponsor;
var changecoordinator;
if(current.table_name == 'change_request'){
var grChange = new GlideRecord(current.table_name);
grChange.get(current.table_sys_id);
changesponsor = grChange.change_sponsor;
changecoordinator = grChange.change_coordinator;
if(gs.getUserID() == changesponsor || gs.getUserID() == changecoordinator)
return grChange.canWrite();
else
return false;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 10:21 AM
Thanks Rashmi !!!!!!!
Iam really happy for this,I will try that & let you know .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 10:27 AM
Please mark my answer helpful or correct if it helps you and for states you can try yourself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2017 10:55 PM
Thanks Rashmi its working !!!!!!