- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2020 08:38 PM
Am trying to change the status of A task ticket for example ( TASK12345) from open to close completed using inbound email action.
it will be one number or more that one on the email body, how the system will trigger that and do the action that we looking for?
Solved! Go to Solution.
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2020 07:37 AM
Ok, so target empty is expected because we are not expecting any new record to be created via this received email.
Any how if you can give me access or we can review all your code and configuration.
you can send me misra.ashish [at ] gmail dot com.
Thanks,
Ashish
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 10:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 10:15 AM
am sorry , i checked them all and I cant find anything not right .
Could not save record because of a compile error: JavaScript parse error at line (19) column (2) problem = syntax error (<refname>; line 19)
(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
var emailBody = email.body_text; // read the email BODY
var taskList = emailBody.split(',') // where "," is delimiter
for(var i=0 ; taskList < length ;i++){
var grTask = new GlideRecord('sc_task') // Table = sc_task
grTask.addQuery('number',taskList[i]); // get the TASK Record
grTask.addQuery('active', true) // check it task is active
grTask.query();
if(grTask.next()){
grTask.state = '3' // 3 is choice code for close completed in sys_choice table for sc_task.
grTask.update();
}
})(current, event, email, logger, classifier);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 10:42 AM
Checked your code, as i mention earlier one closing "}" missing after If condition closed.
please copy the below code and past - i added that "}" .
(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
var emailBody = email.body_text; // read the email BODY
var taskList = emailBody.split(',') // where "," is delimiter
for(var i=0 ; taskList < length ;i++){
var grTask = new GlideRecord('sc_task') // Table = sc_task
grTask.addQuery('number',taskList[i]); // get the TASK Record
grTask.addQuery('active', true) // check it task is active
grTask.query();
if(grTask.next()){
grTask.state = '3' // 3 is choice code for close completed in sys_choice table for sc_task.
grTask.update();
}
}
})(current, event, email, logger, classifier);
In case - you see any error while saving , take the screen shot and share here.
Thanks,
Ashish
Please mark correct answer and helpful for others if it helps you.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 10:48 AM
Thank you, I will try it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2020 07:50 PM
I haven't get error but :
it didnt process : Close completed task : did not create or update sc_task using current
Not sure why or how to check