How to use script log in flow designer

chandan15
Tera Contributor

we are converting a business rule rest api into flow designer. here in line 126, it triggers a log with current time.

br.JPG

How can I do this on flow designer log !

I did something like this, is that correct ! 

script log in FD.JPG

4 REPLIES 4

Aman Kumar S
Kilo Patron

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');

 

Exactly, you can just paste your current script in the Flow logging action like that: 

SoerenMaucher_0-1666967683658.png

I hope that helped! 

Greetings, 
Sören

palanikumar
Giga Sage

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

Not applicable
In Flow designer It can be - 
var
importLog = new GlideImportLog();
importLog.info('htmlString: '+htmlString);