Reputation: 1
Is there a way to pass an argument to a Scriptlet? So my replacement parameter would be like [[script.scriptname("blah")]] and the scriptlet would be:
function a(b){
<do something with b>
return something;
}
a(<string I passed in>)```
Upvotes: 0
Views: 63
Reputation: 136
The value of "blah" is almost certainly coming from some other replaceable parameter, correct? If so, just initialize it within the scriptlet function. This is an effective way of "passing parameters" into Scriptlets and script-type Action Calls (RunScript and RunXrmCommand).
function myScriptletFunction() {
var someVariable = "[[ValueOfBlah]]";
// Do Stuff with someVariable of "blah"
}
myScriptletFunction();
Upvotes: 0