0
votes

I want to run SSJS from CSJS script library... This command works fine in Client Side JavaScript library:

var myVar = "#{javascript:getComponent('myCustomControl').getPropertyMap().property1 = 'test'}";

When I check custom control property1 from SSJS it shows test. So works fine. But I need to substitute 'test' value with some variable, like:

function myFunction(testID){
     var myVar = "#{javascript:getComponent('myCustomControl').getPropertyMap().property1 = '" + testID + "'}";
}

Now when I check customcontrol property1 property it says exactly

'" + testID + "'

so it doesn't calculate/substitute

3

3 Answers

4
votes

I created a video tutorial on how to run SSJS from Client Side JavaScript using Remote Services. It's extremely powerful and allows you to pass parameters and return various objects back to CSJS for processing.

Click here to watch this video tutorial on NotesIn9.com

0
votes

You can't run SSJS from a client side JavaScript library

0
votes

Syntax error.

You have the double-quotes enclosed in single quotes when setting the value.

'" + testID + "'

If you need the value of testID in quotes, use

'"' + testID + '"'

If you just need the value of testID just use

testID

Amiright?