How to setup a limit on approval when reached max purchased right count on software entitlement.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 03:43 AM
Hi Community,
Firstly, we should write a script to limit approval once reached purchased right in one entitlements. Firstly we should query the current members of the AD group and then count the number of purchased rights in one entitlements. Compare it against the purchased right limit. I had already written a script in run script workflow. But it's not working. @Dr Atul G- LNG @Ankur Bawiskar @Mark Roethof
Script :
var answer;
var item = current.cat_item.getDisplayValue();
var gr = new GlideRecord('alm_license');
gr.addQuery('display_name=DocuSign DocuSign CLM+ Standard User for SFDC', item);
gs.log('Suja' + item);
gr.query();
while (gr.next()) {
var lic = gr.purchased_rights;
gs.log('Suja' + lic);
if (purchased_rights < 170) {
answer = 'yes';
gs.log('Suja' + answer);
} else if (purchased_rights > 170) {
answer = 'no';
gs.log('Suja' + answer);
}
}
Thanks,
Spandana.
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 06:44 AM