Error with calling script include in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 01:12 AM
I have a script include with this syntax
var testScriptInclude = Class.create();
testScriptInclude.prototype = {
initialize: function(currentObj) {
this.currentRecord=currentObj;
},
generateDataFields:function(){
var fields = {
'dataone':'',
'datatwo':''
}
// some logic to populate data1 & data2
return fields
I am calling this in inline script in flow designer -

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 03:00 PM
I usually test my scripts with "Scripts - Background" using "gs.info()" or with Script Include because it's much easier to debug.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 03:03 PM
FYI, I've tested the script in question with Scripts - Background and it worked without problem. Try commenting out the "some logic" codes to see if it works. If there's an error, it may be with the input/output variable settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 07:49 PM
yes it works with background script but not in flow designer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 08:37 PM
The script ran perfectly fine with a custom action.
Not sure what the issue was with inline email script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 08:43 PM
Hi
nice to hear, that you could solve your problem by yourself!
Kind regards
Maik