CTASK Questions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2011 07:58 AM
Hello,
I'm a bit new to Service Now forms development so this may be a bit of a rookie question.
We have a process where once a user creates a new Change Record and Saves it or submits it for approval, they can then create Change Task records that can be assigned to a 3rd party provider and sent via a web service call.
The issue we are having is when a user "Saves" a change instead of "Requesting Approval" they can still create a Change Task that will be sent to our 3rd party fulfill-er.
We would like to do one of the following:
1. Prevent our users from creating CTASKs until that Change Record has been submitted for approval.
2. Prevent our Business Rule that sends the CTASKs to our 3rd party from running for Changes that have not been submitted for approval.
Thanks for your assistance.
Mark Didrikson

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2011 10:36 AM
Not sure what you're asking. Just personalize the 'List Control' form and add the 'New Condition' field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2011 11:08 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2011 11:13 AM
Sorry, field is called 'Omit new condition'. From that screenshot, you'll need to right-click the form header and personalize the form in order to add the field. That's where you need to add your script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2011 11:56 AM
OK, I got to the script window to appear.
Can I just add some logic like this to control the visibility of the New button?
answer = checkMe();
function checkMe() {
if (parent.change_request.approval == 'not requested'){
answer = false;
} else {
answer = true;
}
}
Thanks.
Mark Didrikson

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2011 12:43 PM
If you only want the button to appear for Change requests that are not in a 'Not requested' approval state your script should look like this.
if(parent.approval == 'not requested'){
answer = true;
}
else {
answer = false;
}