Question 1mediummultiple choice
Read the full Core Application Development explanation →SNOW-CAD Core Application Development • Complete Question Bank
Complete SNOW-CAD Core Application Development question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
Business Rule script:
(function executeRule(current, previous /*null when async*/) {
var gr = new GlideRecord('incident');
gr.addQuery('category', 'network');
gr.query();
while (gr.next()) {
gr.setValue('priority', 2);
gr.update();
}
})(current, previous);Refer to the exhibit.
ACL record:
Name: incident.write
Type: record
Operation: write
Condition: gs.hasRole('incident_manager')
Script:
answer = true;Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
Controls view access to records
Controls create and update access
Controls delete access
Controls record creation
Controls script execution
Refer to the exhibit.
Exhibit (Business Rule script):
```javascript
(function executeRule(current, previous /*null when async*/) {
if (current.state == 1 && previous.state == 2) {
gs.addErrorMessage('State change is not allowed');
current.setAbortAction(true);
}
})(current, previous);
```Refer to the exhibit.
Exhibit (UI Policy condition script on incident table):
```javascript
(function executeCondition() {
if (g_user.hasRole('admin') && g_user.isInteractive()) {
return true;
}
return false;
})();
```Refer to the exhibit.
Exhibit (ACL condition script):
```javascript
(function evaluateRule() {
if (gs.getUser().getCompany() == gs.getProperty('my_company.sys_id')) {
var mgr = gs.getUser().getManagerID();
if (mgr != '' && current.assigned_to == mgr) {
return true;
}
}
return false;
})();
```Refer to the exhibit.
Business Rule on Incident table:
Name: Set Urgency
Order: 100
Table: Incident
When: before
Condition: current.caller_id.department == 'IT' && current.urgency == ''
Script:
gs.log('Setting urgency to 2');
current.urgency = 2;Refer to the exhibit. ACL configuration: Name: Incident - Read - Custom Type: record Operation: read Table: incident Condition: gs.getUser().getManagerID() == current.assigned_to Script: answer = true;
Refer to the exhibit.
Data Policy configuration on Incident table:
Name: DP - Require short description on category change
Table: Incident
Conditions: short_description IS NOT EMPTY OR category IS NOT EMPTY
Script:
if (current.operation() == 'update' && current.category.changes()) {
current.short_description.setMandatory(true);
}Refer to the exhibit.
Business Rule Script:
(function executeRule(current, previous /*null when async*/) {
if (current.state == 2) {
current.short_description = 'Resolved';
}
})(current, previous);Refer to the exhibit.
ACL Condition Script:
(function checkMembership() {
if (gs.hasRole('itil') && current.assignment_group.isMemberOf(gs.getUserID())) {
return true;
}
return false;
})();Refer to the exhibit.
(function executeRule(current, previous /*null when async*/) {
if (current.state == 'closed') {
current.setAbortAction(true);
}
})(current, previous);