Skip to content

Instantly share code, notes, and snippets.

@ben-ng
Last active March 29, 2017 18:27
Show Gist options
  • Save ben-ng/d8b2cd04986bfe5fdb4923b72b09021f to your computer and use it in GitHub Desktop.
Save ben-ng/d8b2cd04986bfe5fdb4923b72b09021f to your computer and use it in GitHub Desktop.
Salesforce Marketing Cloud Function.length bug
Platform.Load('Core', '1.0');
function moo (foo, bar) {};
Write(moo.length); // You'll get a .NET error if you do this, weirdly enough.
Platform.Load('Core', '1.0');
function moo (foo, bar) {};
moo.argCount = 2; // This stinks, but you need to tack on the arity yourself.
Write(moo.argCount);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment