restrict field on the basis of date using ACL
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2024 07:44 AM
Restrict field on the basis of date using ACL
I have written write ACL on a field. This field should be editable if the date is today's date. if it is not current date then it should not allow the field to be edited.
I have written a script in ACL but not sure what is wrong here:
Script :
//var answer = false;
var gdt = new GlideDate();
gdt.addSeconds(19800);
//var gr = new GlideRecord('x_amspi_smdrs_app_ola_score');
current.addQuery('frequency','Daily');
current.addQuery('ola_formula_score','down_time_minutes');
current.addEncodedQuery('score_number.state=1^ORscore_number.state=2');
current.addQuery('score_number.date',gdt);
current.query();
while(current.next())
{
answer = true;
}
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2024 07:55 AM
Hi @Pratiksha Lang1 ,
Another post in the community should help guide you here. Similar to your request they wanted to make a field editable during a certain period. Check the link below.
To help others, please mark this correct and/or helpful.
Thanks,
Robbie