- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2020 11:14 PM
Hello Guys,
We have created the inbound actions to create the ticket when OTRS tool send an email to Servicenow but along with the mail the extra content is also updating in the ticket( see the print screen) i want to eliminate the extra content and to keep only the main content, i have written a code but no luck.
Can anyone guide me with this Please?
Thanks and Regards,
Prerana
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 05:39 AM
Hello Prenana, I tried with another approach and it worked:
var body = email.body_text;
var expectedTxt= body.split("Bitte denken Sie an")[0] ; // add your line here or keep 4 words
gs.log("expectedTxt: "+expectedTxt);
Thank You!
Abhishek Gardade
ServiceNow MVP 2020
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 12:42 AM
Hello Abhishek,
Thank you for your reply!
I am working in domain seperated instance and i am not sure whether it is recommended to modify the property, i tried to replace the text in the code but no luck, What is your suggestion on this?
Thanks and Regards,
Prerana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 12:57 AM
I tried same thing on my instance and it worked. can you show me how you did it?
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 02:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 02:06 AM
We can write a code for removing text after a specific line/keyword. I have worked on similar use case. I will share a code.
Thanks,
Abhishek Gardade
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 02:31 AM
Thank you!!!
Regards,
Prerana