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 09:18 AM
We need write a ACL on SYS ATTACHMENT TABLE for this & the same I am not getting.
I don't know how we can call these fields & states(change sponsor &change coordinator) in sys attachment table as these are fields of Change form.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 10:03 AM
You can glide record for change request in the ACL. something like below.
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; //replace with your fieldname
changecoordinator = grChange.change_coordinator;
if(changesponsor != '' && gs.hasRole('Change_manager')) //replace with some role who can be change sponsor or coordinator
return grChange.canWrite();
else
return false;
}
}
Please mark answer correct if it answers your query
Thanks,
Rashmi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 10:11 AM
you can done it through before business rule on sys_attachment table. or via ACL also. by the way i did not test the code below
answer = addAttachment();
function addAttachment() {
var inc = new GlideRecord('incident');
if (inc.get(current.table_sys_id)) {
if (inc.caller_id !=''){ // you can access the field through this way.
return false;
}
else
{
return true;
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 09:22 AM
Harshvardhan,
Sorry I don't know about the business need!!!!
My lead has assigned me & I need to finish it by tomorrow
I am struggling lot for this.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 09:51 AM
No Rashmi, No roles those are fields in change form.
Thanks