Calling getUserByID() works in global scope but not in application scope
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2015 10:35 AM
Hello.
I have a business rule (BR) which has a custom script which gets information about a user other than the user I am currently logged in as, just like the following:
var ourUser = gs.getUser();
gs.print(ourUser.getFirstName()); //should print out the first name of the user you are currently logged in as
ourUser = ourUser.getUserByID('abel.tuter'); //fetched a different user --> Exception thrown here when in APPLICATION scope
gs. Âprint(ourUser. ÂgetFirstName()); //this should be the first name of the user you fetched above
This script was working fine when the BR has a GLOBAL scope. But the same script fails when it calls ourUser.getUserByID() in another BR which has an APPLICATION scope. The error is: TypeError: undefined is not a function
Thoughts anybody?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2015 03:13 PM
Thx Grant!