debug, gs.log doesn't work in business rule

jean-lucchatton
Kilo Guru

Hi,

I'm facing a weird issue in a business rule : the gs.log() doesn't write anything in the syslog.

We have defined an application menu "Assigned" to get the incident assigned to the groups that a person belongs to. In the menu, we set a filter condition "assignment group is javascript:GetMyGroups"

find_real_file.png

The function "getMyGroups" is OOB and defined in the business rule "groups, banners". As we wish to return only specific groups (i.e. the groups for assignment not the technical ones), I wish to change the code (I will make a copy).

So I've began with a gs.log, but it doesn't write anythink in the syslog

function getMyGroups() {

  gs.log("IN GET MY GROUPS OOB");

  return gs.getUser().getMyGroups();

}

Very strange....

Could you help me ?

Thanks

Jean-Luc

1 ACCEPTED SOLUTION

Thanks Jean-Luc. Didn't you say that this is a scoped app? If so, gs.log is off limits. Change it to gs.info and see if your script produces output. For best visibility to what's going on, turn on business rule debugging.



System Diagnostics> Debug Business Rule (details) and observe the output at the bottom of your form or list after   you save your changes.


View solution in original post

12 REPLIES 12

Hi Jean-Luc,



Thanks for the feedback. For my explanation of Script Includes, watch episode #6 here:



TechNow Episode List


Hi Chuck,



Great tutorial ! Thanks



Jean-Luc


I had the same issue but gs.info() is also not working for me.

I ma using Dynamic filter option and script include.

The gs.log or gs.info is not working within script include.

Script include is in Global scope. Any help please.