How to use script log in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 07:08 AM
we are converting a business rule rest api into flow designer. here in line 126, it triggers a log with current time.
How can I do this on flow designer log !
I did something like this, is that correct !

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 07:18 AM
As far as I understand you are just trying to log current date time,
You can directly set the code as:
var now = new GlideDateTime();
gs.log(now,'PPM SN to Integration');
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 07:35 AM
Exactly, you can just paste your current script in the Flow logging action like that:
I hope that helped!
Greetings,
Sören

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 07:37 AM
Hi,
I dont think you can pass value for Log Source from the Log activity.
You can run a script to create log. If you have any existing activity with scripting enable then you can use that activity and call gs.log("message","source");
If you want a separate activity then you can create a new activity. Inside the activity you run script to create log. you can call this newly created activity from your flow
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 03:56 AM
var importLog = new GlideImportLog();