- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 03:13 AM
Hi,
This is related to facilities module..
When I submit the request from facilities request form a task is generating for that request. But the problem is the task state is in "Draft" and I need to change this to "Pending Assignment" by default. Like whenever i submit a request it should generate a task with state as "Pending assignment".
Please suggest me how can i do this.. I have written a BR, but it's not working..
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var fcts = new GlideRecord('facilities_request');
if(fcts.get(current.getValue('facilities_request'))){
fcts.state = 10;
fcts.update();
}
})(current, previous);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 04:37 AM
Hi Guys,
I got it fixed...I have just set the action in Br as Set state to Pending assignment and it's working fine..
Thank you so much guys for your response anyway...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 04:08 AM
Can you pls explain your exact requirement. what i understand is your requirement is - For all the tasks( facilities_request_task) generated from facilities request should have default value : Pending Assignment.
If my understanding is correct. then best way is dictionary override for the 'state' field.
REgards,
Sadasiva
Please mark helpful/ correct based on the impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 04:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 04:21 AM
If you want the state Pending Assignment to task then why you are writing Business rule on facilities_request table.
REgards,
Sadasiva
Please mark helpful/ correct based on the impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 04:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 04:40 AM
How is this different from what i said?? what did you do different?